All work
Self-initiated technical buildAI / RAG

CYPHR

A document-grounded RAG platform that answers strictly from uploaded PDFs, providing exact file and page citations.

Explore the architecture
SYSTEM ONLINE/CYPHR • Architecture Deep Dive
125 Tests Passing
Jina v3 1024-D Index
Per-User Isolation
Source-File & Page Citations
Evidence-Led EngineeringAI / RAG

Every answer earns its evidence.

A plausible answer is not the same as a supported one. CYPHR turns uploaded documents into a searchable knowledge base and brings source-file and page citations into the chat experience.

01Illustrative retrieval flow · sample data, not a benchmark
Source: audit_report_2025.pdfp. 14
// Example source passage • Chunk #42

“...Operating margins in Q3 reached 28.4%, representing a 14% efficiency gain in internal search operations. The transition from sparse keyword search to localized dense vector retrieval reduced query latency from 320ms to 18ms across all enterprise tenants... Overall cash flow remains steady.”

1024-D Vector Match
Cosine: 0.894Latency: 18ms
CYPHR Cited AnswerSource Cited

In Q3, operating margins expanded to 28.4%, driven by a 14% operational efficiency gain following the deployment of localized dense vector retrieval, which decreased search latency to 18ms.

audit_report_2025.pdf • Page 14Cosine: 0.894
02System Architecture • Unfolds as You Scroll

The 5 core layers of CYPHR.

Follow one document through the system. The diagram evolves with each chapter; the engineering story stays in ordinary reading flow.

01 of 05
Data Ingestion

Start with the source material.

User-uploaded PDFs are extracted, divided into passages, embedded and indexed before retrieval. Source file and page metadata travel with each passage.

InputUploaded PDFs
PreparationChunked passages
ProvenanceSource file + page
Project Evidence

A retrieval-augmented chat platform that answers strictly from documents you upload. PDFs are extracted, chunked and embedded into MongoDB Atlas vector search; every answer cites the source file and page it came from.

PDF ExtractionPassage ChunkingSource Metadata
The document is the beginning. File and page metadata stay attached.
Illustrative · cyphr/ingestion/parser.py
// Document Intake Pipeline
const chunks = partitionDocument(file, {
  chunkSize: 512,
  chunkOverlap: 64,
  extractMetadata: ["page", "filename", "section"]
});
02 of 05
API Gateway

Make the boundary dependable.

FastAPI handles the application boundary, with Google OAuth, per-user tenant isolation, CSRF and origin validation, and tiered rate limits.

FrameworkFastAPI Async Router
SecurityOAuth 2.0 + CSRF Shield
IsolationPer-user retrieval scope
Project Evidence

FastAPI service layer with Google OAuth and CSRF boundaries

FastAPIOAuth 2.0CSRF DefenseRate Limits
Passages cross an authenticated, per-user boundary before retrieval.
Illustrative · cyphr/gateway/router.py
@router.post("/query")
@limiter.limit("30/minute")
async def handle_rag_query(
    query: QueryRequest,
    user: User = Depends(get_current_authenticated_user)
):
    return await rag_service.query_tenant_store(user.tenant_id, query)
03 of 05
Vector Retrieval

Retrieve evidence, not vibes.

MongoDB Atlas Vector Search uses Jina Embeddings to generate 1024-dimensional dense vectors, returning cosine-ranked passages to keep answers strictly grounded in verified facts.

EmbeddingsJina v3 1024-Dimensional
Index EngineMongoDB Atlas Vector Search
RetrievalRanked source passages
Project Evidence

MongoDB Atlas Vector Search over Jina Embeddings v3

MongoDB AtlasVector SearchJina EmbeddingsCosine Sim
A query searches the vector space. Relevant passages become evidence.
Illustrative · cyphr/vector/search.py
pipeline = [
  {"$vectorSearch": {
    "index": "vector_index",
    "path": "embedding",
    "queryVector": jina_v3_embed(query.text),
    "numCandidates": 100,
    "limit": 5
  }}
]
04 of 05
Grounded LLM

Keep the model layer flexible.

Six configurable LLM providers let the user choose a model at runtime. Retrieved passages supply the context for document-grounded answers with source citations.

Model Routing6 Dynamic Providers
SelectionRuntime model choice
GroundingRetrieved document context
Project Evidence

Configurable LLM providers with runtime model selection

6 ProvidersDynamic RoutingStrict Grounding
Retrieved context travels to the model selected at runtime.
Illustrative · cyphr/orchestrator/router.ts
const response = await modelRouter.generate({
  provider: userSettings.provider,
  context: retrievedPassages,
  instruction: "Answer strictly from context. Cite [File, Page] on every claim."
});
05 of 05
Client Interface

Make confidence visible.

React presents a chat workspace with source-file and page citations, helping the reader check an answer against the uploaded material.

FrontendReact chat workspace
CitationsSource file + page
VerificationDocument provenance
Project Evidence

A retrieval-augmented chat platform that answers strictly from documents you upload. PDFs are extracted, chunked and embedded into MongoDB Atlas vector search; every answer cites the source file and page it came from.

ReactCitationsChat Workspace
The answer carries a citation back to the original file and page.
Illustrative · cyphr/components/ChatWorkspace.tsx
<CitationBadge
  document={chunk.source}
  page={chunk.pageNumber}
  onInspect={() => highlightSourcePassage(chunk.id)}
/>
03Production Engineering Standards
125

Automated Test Coverage

125 automated security and regression tests support the project's release workflow.

Security & regression coverage
Scoped

Per-User Tenant Isolation

Retrieval is scoped to the authenticated user, with CSRF and origin validation at the application boundary.

Google OAuth · access boundaries
6

Supported Model Providers

Six configurable providers with runtime model selection keep the model layer flexible.

Configurable model selection
Cited

Evidentiary Verification

Source-file and page citations give readers a way to check responses against their uploaded documents.

Source file & page provenance