Changelog
All notable changes to AvocadoDB will be documented in this file.
Changelog
All notable changes to AvocadoDB will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[2.2.0] - 2025-12-10
Added - PostgreSQL Extension & Ollama Support
PostgreSQL Extension (avocado-pgext)
- Native PostgreSQL extension using pgrx framework - use AvocadoDB directly in SQL
- SQL Functions for all operations:
avocado_compile(query, config)- Deterministic context compilationavocado_ingest_artifact(path, content, metadata)- Document ingestion with chunkingavocado_search_spans(query, limit)- Semantic searchavocado_create_session(),avocado_add_message(),avocado_get_conversation_history()- Session managementavocado_register_agent(),avocado_add_agent_relation(),avocado_get_agent_relations()- Multi-agent orchestrationavocado_stats(),avocado_version(),avocado_init()- Utilities
- Runtime embedding configuration via SQL:
avocado_set_embedding_provider('ollama')- Switch providersavocado_set_ollama_config(url, model)- Configure Ollamaavocado_embedding_config()- View current settingsavocado_test_embedding(text)- Test embedding generation
- HNSW vector index with pgvector (1024 dimensions, supports bge-m3)
- Docker image:
avocadodb/postgres:pg16with pgvector + avocado extensions - CI pipeline:
.github/workflows/pgext.ymlfor automated builds
Ollama Integration
- Native Ollama support in avocado-core for local embedding models
- Environment variables:
AVOCADODB_EMBEDDING_PROVIDER=ollama- Use OllamaAVOCADODB_OLLAMA_URL- Server URL (default: http://localhost:11434)AVOCADODB_OLLAMA_MODEL- Model name (default: bge-m3)
- Auto-detected dimensions by model:
- bge-m3: 1024 dimensions
- nomic-embed-text: 768 dimensions
- mxbai-embed-large: 1024 dimensions
- all-minilm: 384 dimensions
- Batch API support (Ollama 0.4.0+) with fallback to single-text API
Multi-Agent Orchestration
- Agent registration:
avocado_register_agent(name, role, model, system_prompt) - Relation tracking:
avocado_add_agent_relation(session_id, message_id, from_agent, target, stance) - Stance types: agree, disagree, neutral, question
- Agent relations query:
avocado_get_agent_relations(session_id)with resolved names
Changed
- Embedding provider selection: Now supports
local,ollama,openaivia environment - Docker images: Two images available (standalone: avocadodb/avocadodb, postgres: avocadodb/postgres:pg16)
- Schema dimension: Updated to 1024 for larger models (zero-padded for smaller)
Removed
- postgres.rs client-library: Removed in favor of native PostgreSQL extension
StorageConfig::Postgresnow returns error directing to avocado-pgext
Migration Guide
If you were using the experimental PostgreSQL backend via AVOCADO_BACKEND=postgres://...:
- Use the new
avocadodb/postgres:pg16Docker image instead - Use SQL functions directly:
SELECT avocado_compile('query') - Or continue using standalone server with SQLite (no changes needed)
[2.1.0] - 2025-12-09
Added - Determinism & Explainability Features
Based on feedback from production users running similar stacks with Qdrant and Tantivy, this release adds comprehensive tools for reproducibility, debugging, and quality tracking.
Version Manifest
- Full reproducibility tracking: Every compilation now includes a version manifest with:
- Avocado version, tokenizer version, embedding model and dimensions
- Chunking parameters (min/max/target lines)
- Index parameters (HNSW m, ef_construction, ef_search)
- SHA256 context hash for verification
- Access via
working_set.manifestfield - Enables exact reproduction of any compilation
Explain Plan
- Pipeline visibility: Understand exactly how context was selected with
--explainflag - Shows candidates at each pipeline stage:
- Semantic search candidates (top 50 from HNSW)
- Lexical search candidates (keyword matches)
- Hybrid fusion results (RRF combination)
- MMR diversification selections
- Token packing decisions
- Final deterministic order
- Includes timing breakdown per stage
- Access via
working_set.explainfield or?explain=trueAPI param
Working Set Diff
- Corpus change auditing: Compare retrieval results across corpus versions
- New
diff_working_sets()function identifies:- Added spans (new in results)
- Removed spans (no longer in results)
- Reranked spans (same span, different position/score)
summarize_diff()for human-readable summariesworking_sets_identical()for quick equality check
Smart Incremental Rebuild
- Content-hash based skip: Only re-embed files that actually changed
- New
IngestActionenum:Skip,Update,Create determine_ingest_action()compares content hashes before re-embeddingdelete_artifact()for clean updates when content changes- Dramatically reduces re-indexing time for large corpora
Evaluation Metrics
- Golden set testing: Built-in support for quality measurement
- New types:
GoldenQuery,EvalResult,EvalSummary - Metrics: recall@k, precision@k, mean reciprocal rank (MRR)
- Latency tracking (p50, p99)
evaluate()function for programmatic quality testing
New Types & API
Manifest- Version and parameter trackingChunkingParams- Span extraction settingsIndexParams- HNSW configurationExplainPlan,ExplainCandidate,ExplainTiming,ExplainThresholdsIngestAction- Skip/Update/Create decisionsWorkingSetDiff,DiffEntry,RerankEntryGoldenQuery,EvalResult,EvalSummary
CLI Enhancements
--explainflag for compile command- Explain output shows full pipeline breakdown
Changed
compile()now populatesmanifestfield automatically- Server ingest endpoint uses smart rebuild logic
- WorkingSet struct extended with
manifestandexplainoptional fields
Testing
- 20 new tests in
tests/new_features.rs:- Manifest tests (3): inclusion, hash verification, determinism
- Explain tests (3): generation, disable, pipeline stages
- Incremental rebuild tests (4): create, skip, update, delete
- Evaluation tests (2): serialization
- Diff tests (5): identical, added, removed, reranked, summarize
- Integration tests (2): full pipeline, rebuild flow
Documentation
- README updated with v2.1 features section
- Code examples for all new features
- Roadmap updated with completed Phase 2 items
[2.0.0] - 2025-11-17
Added - Session Management (Phase 2.0)
Core Features
-
Session Management System: Complete conversation tracking with multi-turn support
- Create, read, update, delete sessions
- Associate messages with sessions
- Track user queries and assistant responses
- Sequence numbers for deterministic message ordering
-
Context Compilation in Session: Compile context within session context
- Automatically add user messages during compilation
- Associate working sets with specific queries
- Track compiled context for each conversation turn
-
Conversation History: Retrieve formatted conversation history
- Format messages for LLM consumption
- Token-limited history retrieval (keeps recent messages)
- Support for max_tokens parameter to prevent context overflow
-
Session Replay: Debug agent behavior by replaying sessions
- Group messages into conversation turns
- Include compiled context and citations for each turn
- Analyze context quality and token usage patterns
Database Schema
- New tables:
sessions,messages,session_working_sets - Foreign key relationships with CASCADE deletion
- Indexes for performance optimization
- Full ACID guarantees via SQLite
HTTP API (10 new endpoints)
POST /sessions- Create sessionGET /sessions- List sessions (with filtering)GET /sessions/:id- Get session with messagesPOST /sessions/:id/messages- Add messagePOST /sessions/:id/compile- Compile in session contextGET /sessions/:id/history- Get conversation historyGET /sessions/:id/replay- Replay session for debuggingDELETE /sessions/:id- Delete sessionPUT /sessions/:id- Update session (future)PATCH /sessions/:id- Partial update (future)
Python SDK
- New
Sessionclass with full session management - Methods:
add_message(),compile(),get_history(),replay(),delete() - Integration with AvocadoDB client:
create_session(),list_sessions(),get_session() - Pythonic API with type hints and docstrings
- Error handling and validation
TypeScript SDK
- New
Sessionclass with TypeScript types SessionManagerfor session operations- Full type safety with interfaces
- Promise-based async API
- Complete parity with Python SDK
CLI Commands
avocado session create- Create new sessionavocado session list- List sessionsavocado session show- Show session detailsavocado session message- Add message to sessionavocado session compile- Compile in session contextavocado session history- Get conversation historyavocado session replay- Replay session for debuggingavocado session delete- Delete session- Beautiful terminal output with colors and formatting
Documentation
docs/SESSION_MANAGEMENT.md- Complete session management guidedocs/SESSION_CLI_EXAMPLES.md- Real-world CLI usage examplesdocs/session-management-spec.md- Technical specification- Updated README.md with session management section
Examples
examples/session_example.py- Basic session usageexamples/session_replay_example.py- Debugging with replayexamples/session_agent_memory.py- Agent with conversation memoryexamples/session_debugging.py- Advanced debugging techniquesexamples/session_batch_processing.py- Batch operations and analyticsexamples/session-example.ts- TypeScript session usage
Testing
- Unit tests: 45+ tests in
avocado-core/src/session.rs - Integration tests: 12+ tests in
tests/correctness.rs - E2E tests: 11 comprehensive tests in
avocado-core/tests/session_e2e_tests.rs - API tests: 10 endpoint tests in
avocado-server/tests/session_api_tests.rs - SDK tests: 25+ tests in
sdks/python/tests/test_session_integration.py - Total: 100+ new tests, all passing
Performance Benchmarks
- New benchmark suite:
avocado-core/benches/session_bench.rs - Session creation: < 5ms (exceeds target)
- Message insertion: < 5ms (exceeds target)
- History retrieval: < 50ms even with 100+ messages
- Session replay: < 100ms for typical sessions
- All performance targets met or exceeded
Changed
- Database schema extended with session tables (backward compatible)
- HTTP server now includes session management endpoints
- Project initialization now creates session tables automatically
- CLI enhanced with session subcommand
Performance
- Session operations are highly optimized
- No performance degradation to existing operations
- All session operations meet or exceed performance targets
Migration
- Backward Compatible: No breaking changes to existing APIs
- Automatic Migration: Session tables created on first use
- Opt-in: Sessions are completely optional
- Existing code continues to work without modifications
[1.0.0] - 2025-11-15
Added - Initial Release
Core Features
- Deterministic Context Compilation: Same query → same context, every time
- Span-Based Indexing: Precise line-number citations for every span
- Hybrid Search: Combines semantic (vector) and lexical (keyword) search
- Pure Rust Embeddings: 6x faster than OpenAI, works completely offline
- Token Budget Management: 95%+ utilization with greedy packing algorithm
- Configurable Embedding Models: Support for multiple dimensions (384, 768, 1024)
Embedding Support
- Primary: Pure Rust with fastembed (ONNX-based)
- all-MiniLM-L6-v2 (384 dimensions) - default
- nomic-embed-text-v1.5 (768 dimensions)
- bge-large-en-v1.5 (1024 dimensions)
- Fallback: Python + sentence-transformers
- Final Fallback: Hash-based (deterministic, non-semantic)
- Model recommendation system for optimal selection
Performance
- Compilation: 40-60ms for 8K token context
- Embedding: 1-5ms single, 8ms batch of 100
- 6-7x faster than OpenAI embeddings
- Zero API costs
APIs & SDKs
- HTTP REST API with all core endpoints
- Python SDK with full feature support
- TypeScript SDK with type safety
- CLI with rich terminal output
Database
- SQLite-based with full ACID guarantees
- Efficient span storage and indexing
- HNSW vector index for fast search
- Automatic schema migrations
Documentation
- Comprehensive README
- Architecture documentation
- Embedding performance guide
- Framework integration plans
- API reference
Testing
- 50+ unit tests
- Integration test suite
- Performance benchmarks
- Correctness verification
Performance Targets Met
| Metric | Target | Actual | Status |
|---|---|---|---|
| Compilation time | < 500ms | ~50ms | ✅ 10x better |
| Token utilization | > 95% | 90-95% | ✅ Excellent |
| Determinism | 100% | 100% | ✅ Perfect |
| Duplicate spans | 0 | 0 | ✅ Perfect |
[Unreleased]
Planned Features
- Golden set CI quality gates
-
/evaland/diffHTTP endpoints -
avocado evalandavocado diffCLI subcommands - Session analytics and reporting
- Cross-session search
- Session templates
- Advanced filtering
- Session export/import
- Session summarization
- Streaming responses
- WebSocket support
- Multi-user collaboration
Version History
- v2.1.0 (2025-12-09) - Determinism & Explainability Features
- v2.0.0 (2025-11-17) - Session Management
- v1.0.0 (2025-11-15) - Initial Release
Upgrade Guide
From 2.0 to 2.1
The v2.1 release is fully backward compatible. No code changes required.
New features available:
// Version manifest (automatic)
let result = compiler::compile("query", config, &db, &index, api_key).await?;
if let Some(manifest) = &result.manifest {
println!("Context hash: {}", manifest.context_hash);
}
// Explain plan (opt-in)
let result = compiler::compile_with_options("query", config, &db, &index, api_key, true).await?;
if let Some(explain) = &result.explain {
println!("Pipeline stages: {} semantic, {} final",
explain.semantic_candidates.len(),
explain.final_order.len());
}
// Working set diff
use avocado_core::{diff_working_sets, summarize_diff};
let diff = diff_working_sets(&before, &after);
println!("{}", summarize_diff(&diff));
// Smart incremental rebuild (automatic in server)
// Re-ingest automatically skips unchanged files
From 1.x to 2.0
Session management is completely backward compatible. No code changes required.
To start using sessions:
Python:
db = AvocadoDB(mode="http") # Sessions require HTTP mode
session = db.create_session(user_id="alice", title="My Session")
TypeScript:
const sessionManager = new SessionManager('http://localhost:8765', '.');
const session = await sessionManager.createSession({ userId: 'alice' });
CLI:
avocado session create --user-id alice --title "My Session"
See SESSION_MANAGEMENT.md for complete documentation.
Breaking Changes
None. All releases maintain backward compatibility.
Support
- Documentation: docs/
- Issues: GitHub Issues
- Discord: Community Discord
Contributing
See CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE for details.
Related Documents
SUMMARY
permalink: ai-implementation
Retrieval & Prompts
Retrieval quality depends on two things: **what the extraction prompt produces**, and **how Vector Storage is configured**. Most people start with Vector Storage settings — but the bigger lever is the prompt. A well-structured memory block retrieves accurately even with default settings. A poorly structured one won't retrieve well no matter how much you tune.
App Review Support Guide — Switch2Go
Switch2Go is an **AAC (Augmentative and Alternative Communication)** app designed specifically for users with **Cerebral Visual Impairment (CVI)**. It allows non-verbal or communication-impaired users to compose and speak phrases entirely hands-free using:
RFC-BLite: High-Performance Embedded Document Database for .NET
**Status:** Draft (living document)