{"id":47599446,"url":"https://github.com/ckrough/retriever","last_synced_at":"2026-04-01T18:38:08.444Z","repository":{"id":329579099,"uuid":"1119135180","full_name":"ckrough/retriever","owner":"ckrough","description":"AI-powered document Q\u0026A using RAG (Retrieval-Augmented Generation). Built with FastAPI, Claude, and Chroma for accurate, cited answers.","archived":false,"fork":false,"pushed_at":"2026-03-13T18:45:26.000Z","size":1340,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-14T07:06:59.988Z","etag":null,"topics":["chroma","claude","document-search","fastapi","knowledge-base","llm","python","question-answering","rag","retrieval-augmented-generation","self-service","semantic-search","vector-database"],"latest_commit_sha":null,"homepage":"https://dev.krough.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ckrough.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-18T19:56:06.000Z","updated_at":"2026-03-13T18:45:30.000Z","dependencies_parsed_at":"2025-12-22T17:02:57.356Z","dependency_job_id":null,"html_url":"https://github.com/ckrough/retriever","commit_stats":null,"previous_names":["ckrough/retriever"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ckrough/retriever","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckrough%2Fretriever","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckrough%2Fretriever/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckrough%2Fretriever/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckrough%2Fretriever/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ckrough","download_url":"https://codeload.github.com/ckrough/retriever/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckrough%2Fretriever/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chroma","claude","document-search","fastapi","knowledge-base","llm","python","question-answering","rag","retrieval-augmented-generation","self-service","semantic-search","vector-database"],"created_at":"2026-04-01T18:38:07.674Z","updated_at":"2026-04-01T18:38:08.430Z","avatar_url":"https://github.com/ckrough.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.png\" alt=\"Retriever Logo\" width=\"200\" height=\"200\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eAI-powered Q\u0026A for your organization's documents\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e •\n  \u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e •\n  \u003ca href=\"#configuration\"\u003eConfiguration\u003c/a\u003e •\n  \u003ca href=\"#deployment\"\u003eDeployment\u003c/a\u003e •\n  \u003ca href=\"#documentation\"\u003eDocumentation\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nRetriever is an AI-powered question-answering system that helps users find information in your organization's policy and procedure documents. Upload your documents, and Retriever uses RAG (Retrieval-Augmented Generation) to provide accurate, sourced answers.\n\nRetriever can be adapted for any organization with documentation that users need to search.\n\n## Features\n\n- **Natural Language Q\u0026A** — Ask questions in plain English and get accurate answers with source citations\n- **Multi-Document Support** — Index multiple markdown and text documents\n- **Source Citations** — Every answer includes clickable citations to the original documents\n- **Conversation History** — Continue conversations with context from previous questions\n- **Hybrid Search** — Combines semantic understanding with keyword matching for better retrieval\n- **Content Safety** — Built-in moderation and hallucination detection\n- **User Authentication** — Secure login system with JWT tokens\n- **Semantic Caching** — Faster responses for similar questions\n- **Rate Limiting** — Prevent abuse with configurable request limits\n\n## Quick Start\n\n### Prerequisites\n\n- Python 3.13+ with [uv](https://docs.astral.sh/uv/)\n- Node.js 22+\n- Docker\n- [Supabase CLI](https://supabase.com/docs/guides/cli)\n- API keys: [OpenRouter](https://openrouter.ai/keys) (LLM) and [OpenAI](https://platform.openai.com/api-keys) (embeddings/moderation)\n\n### Get Running\n\n```bash\ngit clone https://github.com/your-org/retriever.git\ncd retriever\ncp .env.example .env\n# Edit .env with your API keys\n\nsupabase start                    # Auth + Supabase services\ndocker compose up -d              # pgvector postgres + jaeger\n\ncd backend \u0026\u0026 uv sync --dev\nuv run alembic upgrade head\nuv run uvicorn retriever.main:app --reload --port 8000\n\n# In a separate terminal:\ncd frontend \u0026\u0026 npm install \u0026\u0026 npm run dev\n```\n\nBackend API: [http://localhost:8000/docs](http://localhost:8000/docs) | Frontend: [http://localhost:5173](http://localhost:5173)\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for full development setup, quality checks, and workflow.\n\n## Usage\n\n### Web Interface\n\n1. **Login** — Create an account or log in at `/login`\n2. **Ask Questions** — Type your question in the chat interface\n3. **View Sources** — Click citation cards to see the original document text\n4. **Continue Conversations** — Ask follow-up questions with context preserved\n\n### API\n\nRetriever exposes a REST API for programmatic access:\n\n```bash\n# Ask a question\ncurl -X POST http://localhost:8000/api/v1/rag/ask \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -d '{\"question\": \"What is the check-in procedure?\"}'\n```\n\nAPI documentation is available at `/docs` (OpenAPI/Swagger).\n\n## Configuration\n\nSee `.env.example` for all configuration options. Required API keys:\n\n| Variable | Description |\n|----------|-------------|\n| `OPENROUTER_API_KEY` | LLM provider API key |\n| `OPENAI_API_KEY` | Embeddings and moderation API key |\n\nAuth is handled by Supabase (local via `supabase start`, production via Supabase project). See [CONTRIBUTING.md](CONTRIBUTING.md) for full environment setup.\n\n### Document Preparation\n\nFor best results:\n\n- Use **markdown format** with clear headings (`#`, `##`, `###`)\n- Keep sections focused on single topics\n- Use descriptive headings that match how users ask questions\n- Include relevant keywords naturally in the text\n\n## Deployment\n\n- **Backend:** Cloud Run via `gcloud run deploy --source ./backend`\n- **Frontend:** Cloudflare Pages\n- **Database:** Supabase (managed Postgres + pgvector)\n\n### Production Checklist\n\n- [ ] Set `DEBUG=false`\n- [ ] Configure Supabase project with RLS policies\n- [ ] Set up Cloudflare AI Gateway for LLM routing\n- [ ] Configure OpenTelemetry (GCP Cloud Trace or OTLP endpoint)\n- [ ] Enable Langfuse for LLM observability (optional)\n- [ ] HTTPS handled by Cloud Run / Cloudflare Pages\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    DOCUMENT PIPELINE                         │\n│  [Markdown/Text] → [Chunker] → [Embeddings] → [pgvector]     │\n└─────────────────────────────────────────────────────────────┘\n                                                    ↓\n┌─────────────────────────────────────────────────────────────┐\n│                      QUERY FLOW                              │\n│  [Question] → [Hybrid Search] → [Rerank] → [LLM] → [Answer]  │\n└─────────────────────────────────────────────────────────────┘\n```\n\n**Tech Stack:**\n- **Backend:** Python 3.13+, FastAPI, SQLAlchemy 2.0 async, Pydantic 2.x\n- **LLM:** OpenRouter via Cloudflare AI Gateway\n- **Vector DB:** Supabase Postgres + pgvector (HNSW cosine + GIN full-text)\n- **Frontend:** SvelteKit + Svelte 5 runes + Skeleton UI v4\n- **Auth:** Supabase Auth / JWKS\n- **Observability:** structlog + OpenTelemetry + Langfuse\n- **Deploy:** Cloud Run (backend), Cloudflare Pages (frontend)\n\n## Development\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for full setup and quality check commands.\n\n## Documentation\n\n- [Architecture Overview](docs/architecture.md)\n- [Development Standards](docs/development-standards.md)\n- [Implementation Roadmap](docs/increments.md)\n- [Deployment Guide](docs/guides/deployment.md)\n- [Adding Documents](docs/guides/adding-documents.md)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckrough%2Fretriever","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fckrough%2Fretriever","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckrough%2Fretriever/lists"}