Data Model and Service Boundaries
Model Source, DocumentVersion, Chunk, IngestionJob, QueryTrace, Citation, and EvaluationCase. Separate stable source identity from revision identity. Modules should cover connectors, parsers, chunkers, embeddings, index access, retrieval, prompt assembly, generation, citation validation, and evaluation. A modular monolith is often a good starting point; clear boundaries matter more than microservices.
Implementation example
Source 1---* DocumentVersion 1---* Chunk
Source 1---* IngestionJob
QueryTrace 1---* Citation
EvaluationCase 1---* EvaluationRun💡 The model traces answers back to source revisions and supports reproducibility.
Key Takeaways
- Inspect the relevant pipeline stage instead of guessing.
- Preserve source provenance, versions, and access scope.
- Measure quality on representative queries.
Knowledge Check
Why distinguish Source from DocumentVersion?