Docent AI is designed using a high-performance, modular architecture that separates concerns into:
- Ingestion.
- Semantic processing.
- Vector storage.
- Inference and response generation.
3.1 High-Level Flow
At a high level, the user interacts with a web frontend that communicates with a FastAPI backend. The backend orchestrates ingestion, embedding, storage, and retrieval, then delegates response generation to Groq-hosted Llama 3.3.
A conceptual flow:
- User submits a query and optionally uploads URLs or PDFs,
- Backend ingests and normalizes the data.
- Embeddings are generated using Google Gemini.
- Embeddings are stored in Pinecone.
- Query embeddings are used to retrieve relevant context.
- Context is fed into the LLM (Llama 3.3 on Groq) via a controlled prompt.
- The model returns a grounded, code-formatted response, streamed back to the user.
3.2 Architecture
-
User / Frontend
Sends query and uploads files to the backend.
-
Ingestion Pipeline
- Crawl4AI handles URL crawling and content extraction.
- PyPDF and Gemini Vision handle PDF and image parsing.
-
Semantic Processing
Google Gemini (text-embedding-004) transforms text into vector embeddings.
-
Vector Database
Pinecone stores and indexes these embeddings for similarity search.