change prompt
This commit is contained in:
parent
115e72dd53
commit
847f2f5b8a
6 changed files with 104 additions and 48 deletions
|
|
@ -1,14 +1,14 @@
|
|||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: news-analyst
|
||||
namespace: customer1
|
||||
name: analyst-gemma
|
||||
namespace: customer1
|
||||
spec:
|
||||
schedule: "15 * * * *"
|
||||
schedule: "15 * * * *"
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
spec:
|
||||
volumes:
|
||||
- name: ollama-storage
|
||||
emptyDir: {}
|
||||
|
|
@ -17,32 +17,38 @@ spec:
|
|||
- name: model-puller
|
||||
image: ollama/ollama:latest
|
||||
volumeMounts:
|
||||
- name: ollama-storage
|
||||
- name: ollama-storage
|
||||
mountPath: /root/.ollama
|
||||
command: ["/bin/sh", "-c"]
|
||||
args: ["ollama serve & sleep 5 && ollama pull gemma2"]
|
||||
|
||||
|
||||
- name: ollama-sidecar
|
||||
image: ollama/ollama:latest
|
||||
restartPolicy: Always # This is the magic
|
||||
ports:
|
||||
- containerPort: 11434
|
||||
volumeMounts:
|
||||
- name: ollama-storage
|
||||
mountPath: /root/.ollama
|
||||
resources:
|
||||
limits:
|
||||
nvidia.com/gpu: 1
|
||||
|
||||
|
||||
containers:
|
||||
- name: analyst
|
||||
image: siriussec/summarizer:latest
|
||||
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: news-app-config
|
||||
|
||||
|
||||
- secretRef:
|
||||
name: news-user-password
|
||||
|
||||
|
||||
- name: ollama-sidecar
|
||||
image: ollama/ollama:latest
|
||||
ports:
|
||||
- containerPort: 11434
|
||||
volumeMounts:
|
||||
- name: ollama-storage
|
||||
mountPath: /root/.ollama
|
||||
resources:
|
||||
limits:
|
||||
nvidia.com/gpu: 1
|
||||
restartPolicy: OnFailure
|
||||
- name: analyst
|
||||
image: siriussec/summarizer:latest
|
||||
env:
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: news-user-password
|
||||
key: password
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: news-app-config
|
||||
# Make sure your summarizer script talks to http://localhost:11434
|
||||
# (or http://127.0.0.1:11434)
|
||||
|
||||
restartPolicy: OnFailure
|
||||
|
|
|
|||
|
|
@ -11,8 +11,23 @@ data:
|
|||
LLM_URL: "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent"
|
||||
MODEL_NAME: "gemini-2.0-flash"
|
||||
SUMMARY_PROMPT: |
|
||||
You are an expert news analyst working for DARPA . Analyze these news articles
|
||||
ARTICLES
|
||||
{data}
|
||||
report back a 4-5 sentence summary for each of the most impactful events. Also a few paragraphs on the lesser important articles.
|
||||
You are an expert news analyst working for DARPA. Your task is to deliver thorough, insightful analysis of the provided news articles.
|
||||
|
||||
ARTICLES:
|
||||
{data}
|
||||
|
||||
Instructions:
|
||||
- Identify the 3–6 most impactful events or developments (prioritize geopolitical, technological, military, economic, or security implications).
|
||||
- For each impactful event: Write a detailed 4–6 sentence summary, including key facts, context, potential consequences, and why it matters strategically.
|
||||
- For all remaining/lesser articles: Write 2–4 cohesive paragraphs synthesizing them into broader themes or trends (do NOT list them individually unless critical).
|
||||
- Aim for a total output length of 400–800 words. Be comprehensive but concise.
|
||||
- Always produce substantial content — even if articles seem minor, extract value, implications, or connections.
|
||||
- Use neutral, professional, analytical tone with precise language.
|
||||
- Structure your response clearly with headings like:
|
||||
## Most Impactful Events
|
||||
### Event 1: [Brief Title]
|
||||
[4–6 sentences...]
|
||||
...
|
||||
## Synthesis of Lesser Developments
|
||||
[Paragraphs...]
|
||||
- Output ONLY the structured report — no introductions, apologies, or meta-comments like "no major events found".
|
||||
|
|
|
|||
Loading…
Reference in a new issue