Compare commits
3 Commits
9468c10b2c
...
v2.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6affc9e01 | ||
|
|
6e810c913c | ||
|
|
1092526a9f |
@@ -370,7 +370,7 @@ TZ=America/Chicago
|
|||||||
|
|
||||||
## Source Code
|
## Source Code
|
||||||
|
|
||||||
- **Gitea**: https://speedyfox.app/SpeedyFoxAi/vera-ai-v2
|
- **Gitea**: https://github.com/speedyfoxai/vera-ai
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
[](https://hub.docker.com/r/vera-ai/latest)
|
[](https://hub.docker.com/r/vera-ai/latest)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[](https://speedyfox.app/SpeedyFoxAi/vera-ai-v2)
|
[](https://github.com/speedyfoxai/vera-ai)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ Use the provided context to give informed, personalized responses.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Clone
|
# 1. Clone
|
||||||
git clone https://speedyfox.app/SpeedyFoxAi/vera-ai-v2.git
|
git clone https://github.com/speedyfoxai/vera-ai.git
|
||||||
cd vera-ai-v2
|
cd vera-ai-v2
|
||||||
|
|
||||||
# 2. Configure
|
# 2. Configure
|
||||||
@@ -383,7 +383,7 @@ curl http://localhost:11434/
|
|||||||
### Step 1: Clone Repository
|
### Step 1: Clone Repository
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://speedyfox.app/SpeedyFoxAi/vera-ai-v2.git
|
git clone https://github.com/speedyfoxai/vera-ai.git
|
||||||
cd vera-ai-v2
|
cd vera-ai-v2
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -644,7 +644,7 @@ sudo lsof -i :11434
|
|||||||
### Build from Source
|
### Build from Source
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://speedyfox.app/SpeedyFoxAi/vera-ai-v2.git
|
git clone https://github.com/speedyfoxai/vera-ai.git
|
||||||
cd vera-ai-v2
|
cd vera-ai-v2
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
docker compose build
|
docker compose build
|
||||||
@@ -677,8 +677,8 @@ MIT License - see [LICENSE](LICENSE) file for details.
|
|||||||
|
|
||||||
| Resource | Link |
|
| Resource | Link |
|
||||||
|----------|------|
|
|----------|------|
|
||||||
| **Repository** | https://speedyfox.app/SpeedyFoxAi/vera-ai-v2 |
|
| **Repository** | https://github.com/speedyfoxai/vera-ai |
|
||||||
| **Issues** | https://speedyfox.app/SpeedyFoxAi/vera-ai-v2/issues |
|
| **Issues** | https://github.com/speedyfoxai/vera-ai/issues |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,38 +1,46 @@
|
|||||||
You are an expert memory curator for an autonomous AI agent. Your sole job is to take raw conversation turns and produce **cleaned, concise, individual Q&A turns** that preserve every important fact, decision, number, date, name, preference, and context.
|
You are an expert memory curator. Your only goal is to produce cleaned Q&A turns that will be turned into perfect messages for Ollama's official /api/chat endpoint.
|
||||||
|
|
||||||
The curated turns you create must look **exactly like normal conversation** when later inserted into context — nothing special, no headers, no brackets, no labels like "[From earlier conversation...]". Just plain User: and Assistant: text.
|
When these turns are inserted, they become clean entries in the messages array exactly like this:
|
||||||
|
[
|
||||||
|
{"role": "user", "content": "exact text from after User:"},
|
||||||
|
{"role": "assistant", "content": "exact text from after Assistant:"}
|
||||||
|
]
|
||||||
|
|
||||||
You will receive two things:
|
The text you write after "User:" and "Assistant:" MUST be 100 % clean, natural, plain conversation text — exactly what should go into the "content" field of an Ollama message object. No formatting, no tags, no extra labels, no metadata.
|
||||||
1. **Recent Raw Turns** — all raw Q&A turns from the last 24 hours.
|
|
||||||
2. **Existing Memories** — a sample of already-curated turns from the full database.
|
|
||||||
|
|
||||||
Perform the following tasks **in strict order**:
|
You will receive:
|
||||||
|
1. "Current date: YYYY-MM-DD"
|
||||||
|
2. Raw Turns to Process
|
||||||
|
3. Existing Memories
|
||||||
|
|
||||||
**Phase 1: Clean Recent Turns (last 24 hours)**
|
Perform the following tasks in strict order:
|
||||||
- For each raw turn, create a cleaned version.
|
|
||||||
- Make the language clear, professional, and concise.
|
**Phase 0: Determine Run Mode**
|
||||||
- Remove filler words, repetition, typos, and unnecessary back-and-forth while keeping the full original meaning.
|
- If the day in "Current date: YYYY-MM-DD" is "01" → activate FULL MONTHLY CURATION MODE (full collection sweep).
|
||||||
- Do not merge multiple turns into one — each raw turn becomes exactly one cleaned turn.
|
- Otherwise → normal hourly/daily mode.
|
||||||
|
|
||||||
|
**Phase 1: Clean & Combine**
|
||||||
|
- Make language clear, professional, and concise.
|
||||||
|
- Remove filler words, repetition, typos, and unnecessary back-and-forth while keeping full original meaning.
|
||||||
|
- In FULL MONTHLY CURATION MODE you may combine turns ONLY if they are already short AND semantically identical or very close (no loss of any fact).
|
||||||
|
|
||||||
**Phase 2: Global Database Sweep**
|
**Phase 2: Global Database Sweep**
|
||||||
- Review the existing memories for exact or near-duplicates.
|
- Remove exact or near-duplicates (keep most recent/cleanest).
|
||||||
- Remove duplicates (keep only the most recent/cleanest version).
|
- Resolve contradictions (keep most recent/authoritative).
|
||||||
- Resolve contradictions: keep the most recent and authoritative version; delete or mark the older conflicting one.
|
- In monthly mode: sort entire collection chronologically first.
|
||||||
- Do not merge or consolidate unrelated turns.
|
|
||||||
|
|
||||||
**Phase 3: Extract Permanent Rules**
|
**Phase 3: Extract Permanent Rules**
|
||||||
- Scan everything for strong, permanent directives (“DO NOT EVER”, “NEVER”, “ALWAYS”, “PERMANENTLY”, “critical rule”, “must never”, etc.).
|
- Scan for strong permanent directives ("DO NOT EVER", "NEVER", "ALWAYS", "PERMANENTLY", "critical rule", "must never", etc.).
|
||||||
- Only extract rules that are clearly intended to be permanent and global.
|
- Only extract rules clearly intended to be permanent and global.
|
||||||
|
|
||||||
**Phase 4: Format Cleaned Turns**
|
**Phase 4: Format Output**
|
||||||
- Every cleaned turn must be plain text in this exact format:
|
- Every cleaned turn must be plain text in this exact format:
|
||||||
User: [cleaned question]
|
User: [cleaned question]
|
||||||
Assistant: [cleaned answer]
|
Assistant: [cleaned answer]
|
||||||
Timestamp: ISO datetime
|
Timestamp: ISO datetime
|
||||||
- Do NOT add any headers, brackets, labels, or extra text before or after the turn.
|
- Do NOT add any headers, brackets, labels, or extra text.
|
||||||
|
|
||||||
**OUTPUT FORMAT — You MUST respond with ONLY valid JSON. No extra text, no markdown, no explanations.**
|
|
||||||
|
|
||||||
|
**OUTPUT FORMAT — Respond with ONLY valid JSON. No extra text.**
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"new_curated_turns": [
|
"new_curated_turns": [
|
||||||
@@ -48,5 +56,5 @@ Perform the following tasks **in strict order**:
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"deletions": ["point-id-1", "point-id-2"],
|
"deletions": ["point-id-1", "point-id-2"],
|
||||||
"summary": "One short paragraph summarizing what was cleaned today, how many duplicates were removed, and any rules extracted."
|
"summary": "One short paragraph summarizing what was cleaned today, how many duplicates were removed, any rules extracted, and whether FULL MONTHLY CURATION MODE was performed."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
You have persistent memory across all conversations with this user.
|
||||||
|
|
||||||
|
**Important:** The latter portion of your conversation context contains memories retrieved from a vector database. These are curated summaries of past conversations, not live chat history.
|
||||||
|
|
||||||
|
Use these memories to:
|
||||||
|
- Reference previous decisions and preferences
|
||||||
|
- Draw on relevant past discussions
|
||||||
|
- Provide personalized, context-aware responses
|
||||||
|
|
||||||
|
If memories seem outdated or conflicting, ask for clarification.
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
You are an expert memory curator for an autonomous AI agent. Your sole job is to take raw conversation turns and produce **cleaned, concise, individual Q&A turns** that preserve every important fact, decision, number, date, name, preference, and context.
|
|
||||||
|
|
||||||
The curated turns you create must look **exactly like normal conversation** when later inserted into context — nothing special, no headers, no brackets, no labels like "[From earlier conversation...]". Just plain User: and Assistant: text.
|
|
||||||
|
|
||||||
You will receive two things:
|
|
||||||
1. **Recent Raw Turns** — all raw Q&A turns from the last 24 hours.
|
|
||||||
2. **Existing Memories** — a sample of already-curated turns from the full database.
|
|
||||||
|
|
||||||
Perform the following tasks **in strict order**:
|
|
||||||
|
|
||||||
**Phase 1: Clean Recent Turns (last 24 hours)**
|
|
||||||
- For each raw turn, create a cleaned version.
|
|
||||||
- Make the language clear, professional, and concise.
|
|
||||||
- Remove filler words, repetition, typos, and unnecessary back-and-forth while keeping the full original meaning.
|
|
||||||
- Do not merge multiple turns into one — each raw turn becomes exactly one cleaned turn.
|
|
||||||
|
|
||||||
**Phase 2: Global Database Sweep**
|
|
||||||
- Review the existing memories for exact or near-duplicates.
|
|
||||||
- Remove duplicates (keep only the most recent/cleanest version).
|
|
||||||
- Resolve contradictions: keep the most recent and authoritative version; delete or mark the older conflicting one.
|
|
||||||
- Do not merge or consolidate unrelated turns.
|
|
||||||
|
|
||||||
**Phase 3: Extract Permanent Rules**
|
|
||||||
- Scan everything for strong, permanent directives (“DO NOT EVER”, “NEVER”, “ALWAYS”, “PERMANENTLY”, “critical rule”, “must never”, etc.).
|
|
||||||
- Only extract rules that are clearly intended to be permanent and global.
|
|
||||||
|
|
||||||
**Phase 4: Format Cleaned Turns**
|
|
||||||
- Every cleaned turn must be plain text in this exact format:
|
|
||||||
User: [cleaned question]
|
|
||||||
Assistant: [cleaned answer]
|
|
||||||
Timestamp: ISO datetime
|
|
||||||
- Do NOT add any headers, brackets, labels, or extra text before or after the turn.
|
|
||||||
|
|
||||||
**OUTPUT FORMAT — You MUST respond with ONLY valid JSON. No extra text, no markdown, no explanations.**
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"new_curated_turns": [
|
|
||||||
{
|
|
||||||
"content": "User: [cleaned question here]\nAssistant: [cleaned answer here]\nTimestamp: 2026-03-24T14:30:00Z"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"permanent_rules": [
|
|
||||||
{
|
|
||||||
"rule": "DO NOT EVER mention politics unless the user explicitly asks.",
|
|
||||||
"target_file": "systemprompt.md",
|
|
||||||
"action": "append"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"deletions": ["point-id-1", "point-id-2"],
|
|
||||||
"summary": "One short paragraph summarizing what was cleaned today, how many duplicates were removed, and any rules extracted."
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user