← Knowledge Store

Stack & structure

knowledge-store · workzone
Backend
stack — libraries
Framework / DB
FastAPI Pydantic v2 SQLAlchemy 2.0 · async asyncpg
PostgreSQL pgvector · HNSW tsvector · GIN recursive SQL · CTE Alembic
Background curation → Curation Pass
SAQ cron Redis · queue → Cache & Workers
embeddings · external service
structure — files · achilles/knowledge_store/
knowledge_store/   module = its own package
├── *.py           constants · models · schemas
├── services/      business logic — folder from the start
├── repositories/  data access — folder from the start
└── retrieval/     four search primitives + fusion
Why retrieval/ is its own folder
Four search paradigms (exact · vector · lexical · graph) and their fusion form a distinct layer on top of the repositories: each primitive sits in its own module, and fusion assembles them into a single response.
Dedicated engines — not in v1. Qdrant (vectors) and Neo4j (graph) are unused in v1: vectors and the graph live in a single PostgreSQL for a unified ACL query — a load-bearing module decision. A dedicated graph engine (Neo4j) is v2, should recursive SQL prove insufficient.