RAG-powered knowledge retrieval — ingest docs, query in natural language, get cited answers.
Cortex is a production-ready RAG platform with a Python FastAPI backend and Next.js chat + admin frontend. Built for teams that need grounded AI answers from their own knowledge base, with zero hallucination risk on enterprise content.
| Without Cortex | With Cortex | |
|---|---|---|
| Find an answer in internal docs | Search, skim 10 pages, guess | Natural language query, cited answer in <1s |
| Onboard new team member | 2-week ramp reading wikis | Ask Cortex, get authoritative answers |
| Keep answers accurate | Docs drift, answers go stale | Re-ingest on change, always current |
| Deploy to production | Custom infra from scratch | docker compose up, add k8s manifests |
git clone https://github.com/dsantoreis/cortex.git && cd cortex
docker compose up --build
curl -X POST http://localhost:8000/api/v1/ingest \
-H 'Content-Type: application/json' \
-d '{"text": "Cortex is a RAG platform for grounded knowledge retrieval.", "source": "intro"}'Then query:
curl -X POST http://localhost:8000/api/v1/query \
-H 'Content-Type: application/json' \
-d '{"question": "What is Cortex?"}'Open the chat UI at http://localhost:3000.
flowchart LR
DOCS[Documents] --> INGEST[Ingest API]
INGEST --> EMBED[Embedding Pipeline]
EMBED --> STORE[Vector Store]
QUERY[User Query] --> RETRIEVE[Retrieval Engine]
STORE --> RETRIEVE
RETRIEVE --> LLM[LLM + Citation]
LLM --> UI[Next.js Chat UI]
backend/— FastAPI (Python) with/api/v1/ingest,/api/v1/query,/healthfrontend/— Next.js App Router chat + admin dashboardk6/— load test suitek8s/— Kubernetes deployment manifestsdocs-site/— full documentation
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check |
/api/v1/ingest |
POST | Ingest document text with source metadata |
/api/v1/query |
POST | Query knowledge base, returns answer + citations |
cd backend && pytest -q # unit + integration
cd frontend && npm test # Vitest component tests
k6 run k6/stress.js # load testdocker compose up --buildkubectl apply -f k8s/- Multi-tenant workspace isolation
- Streaming query responses (SSE)
- Source freshness tracking and auto-reingest
- Slack / Teams integration for in-chat queries
See CONTRIBUTING.md. Issues and PRs welcome.
Report vulnerabilities via SECURITY.md.
MIT — see LICENSE.
If Cortex saves your team hours on knowledge retrieval, star the repo and open an issue with your use case.