Your documents.Finally intelligent.
Cortex turns your PDFs, documents, and notes into a smart, conversational knowledge base — hybrid search, AI re-ranking, and source citations on every answer.
Workspace
Cortex
Cortex turns your PDFs, documents, and notes into a smart, conversational knowledge base — hybrid search, AI re-ranking, and source citations on every answer.
Workspace
Architecture
This is the exact retrieval pipeline running behind every chat message — not a diagram made for marketing.
Uploaded PDFs and documents are parsed and split into overlapping chunks, ready for embedding.
document_chunksEach chunk is embedded with gemini-embedding-001 and truncated to 768 dimensions, then stored in Supabase pgvector.
768-dimpgvector cosine similarity and Postgres full-text search run in parallel, fused with Reciprocal Rank Fusion.
RRF · k=60The top 10 candidate chunks are scored for relevance and cut down to the 3 that actually answer the question.
gemini-3.1-flash-liteThe agent checks whether the retrieved context is sufficient, or reaches out to live web search when it isn't.
tool-calling · TavilyThe final answer streams back token-by-token over Server-Sent Events, cited to the exact source chunk.
SSE · gemini-2.5-flashUnder the hood
Every answer is retrieved, re-ranked, and streamed by real infrastructure — here's what's actually running.
Every query runs two searches in parallel — dense vector similarity and Postgres full-text search — then fuses the results with Reciprocal Rank Fusion.
Matryoshka-truncated embeddings stored in Supabase pgvector, scoped per workspace so documents never cross tenants.
The top 10 retrieved chunks are scored for relevance and cut down to the 3 that actually answer the question.
When your documents don't have the answer, the agent calls out to live web search instead of guessing.
Every claim traces back to the exact document and chunk it came from — click a citation to see the source.
Drop in your PDFs and start asking questions in seconds. No setup, no config — just answers.