6.1 Multi-Source Ingestion
Docent AI supports indexing from:
- Web:
- Recursively crawls internal links from a base URL.
- Configurable depth and domain constraints to avoid noise.
- PDFs:
- Uses PyPDF for text extraction.
- Splits long PDFs into logical chunks (for example, by section or page ranges) to improve retrieval granularity.
- Images (Visual Analysis):
- Accepts common formats such as PNG, JPG, HEIC.
- Uses Gemini Vision to:
- Read embedded text.
- Capture structural information (for example, components in an architecture diagram).
- Converts the result into indexable text.
6.2 Enterprise-Grade Reliability
- Key Rotation Algorithm:
- On detection of
rate_limit or similar failures from Groq API:
- Logs an informative message (for example, “Key 1 failed… switching to Key 2”).
- Automatically switches keys without impacting the user session.
- Failure Handling:
- If external services (for example, Pinecone, Gemini) fail:
- Errors are logged.
- The system returns a clearly worded failure response instead of hanging or silently failing.
6.3 Strictly Governed RAG
To minimize hallucinations:
-
Context-Adherent Responses:
The prompt explicitly instructs the model to rely only on retrieved context from Pinecone.
-
Explicit Failure Mode:
If relevant information is absent from the retrieved context, the model is instructed to respond with:
“I do not have that information.”
-
Code Formatting:
All code snippets are returned inside Markdown code fences with language tags, for example:
def example():
print("Hello, Docent AI")
This improves readability and copying into IDEs.