{"data":{"slug":"superlinear-ai-raglite","name":"raglite","tagline":"Python toolkit for Retrieval-Augmented Generation (RAG) with DuckDB or PostgreSQL","github_url":"https://github.com/superlinear-ai/raglite","owner":"superlinear-ai","repo":"raglite","owner_avatar_url":"https://avatars.githubusercontent.com/u/32849250?v=4","primary_language":"Python","stars":1202,"forks":109,"topics":["chainlit","colbert","duckdb","evals","late-chunking","late-interaction","llm","markdown","pdf","pgvector","postgres","postgresql","query-adapter","rag","reranking","retrieval-augmented-generation","sqlite","vector-search"],"archived":false,"github_pushed_at":"2026-08-17T07:19:07+00:00","maintenance_label":"Steady","stars_delta_30d":6,"url":"https://www.graphcanon.com/tools/superlinear-ai-raglite","markdown_url":"https://www.graphcanon.com/tools/superlinear-ai-raglite.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/superlinear-ai-raglite","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=superlinear-ai-raglite","description":"🥤 RAGLite is a Python toolkit for Retrieval-Augmented Generation (RAG) with DuckDB or PostgreSQL","homepage_url":null,"license":"MPL-2.0","open_issues":14,"watchers":13,"ai_summary":"RAGLite is a Python-based toolkit facilitating Retrieval-Augmented Generation using either DuckDB or PostgreSQL as backend databases.","readme_excerpt":"# 🥤 RAGLite\n\nRAGLite is a Python toolkit for Retrieval-Augmented Generation (RAG) with DuckDB or PostgreSQL.\n\n## Features\n\n##### Configurable\n\n- 🧠 Choose any LLM provider with [LiteLLM](https://github.com/BerriAI/litellm), including local [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) models\n- 💾 Choose either [DuckDB](https://duckdb.org) or [PostgreSQL](https://github.com/postgres/postgres) as a keyword & vector search database\n- 🥇 Choose any reranker with [rerankers](https://github.com/AnswerDotAI/rerankers), including multilingual [FlashRank](https://github.com/PrithivirajDamodaran/FlashRank) as the default\n\n##### Fast and permissive\n\n- ❤️ Only lightweight and permissive open source dependencies (e.g., no [PyTorch](https://github.com/pytorch/pytorch) or [LangChain](https://github.com/langchain-ai/langchain))\n- 🚀 Acceleration with Metal on macOS, and CUDA on Linux and Windows\n\n##### Unhobbled\n\n- 📖 PDF to Markdown conversion on top of [pdftext](https://github.com/VikParuchuri/pdftext) and [pypdfium2](https://github.com/pypdfium2-team/pypdfium2)\n- 🧬 Multi-vector chunk embedding with [late chunking](https://weaviate.io/blog/late-chunking) and [contextual chunk headings](https://d-star.ai/solving-the-out-of-context-chunk-problem-for-rag)\n- ✏️ Optimal sentence splitting with [wtpsplit-lite](https://github.com/superlinear-ai/wtpsplit-lite) by solving a [binary integer programming problem](https://en.wikipedia.org/wiki/Integer_programming)\n- ✂️ Optimal [semantic chunking](https://www.youtube.com/watch?v=8OJC21T2SL4&t=1930s) by solving a [binary integer programming problem](https://en.wikipedia.org/wiki/Integer_programming)\n- 🔍 [Hybrid search](https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf) with the database's native keyword & vector search ([FTS](https://duckdb.org/docs/stable/extensions/full_text_search)+[VSS](https://duckdb.org/docs/stable/extensions/vss); [tsvector](https://www.postgresql.org/docs/current/datatype-textsearch.html)+[pgvector](https://github.com/pgvector/pgvector))\n- 💭 [Adaptive retrieval](https://arxiv.org/abs/2403.14403) where the LLM decides whether to and what to retrieve based on the query\n- 💰 Improved cost and latency with a [prompt caching-aware message array structure](https://platform.openai.com/docs/guides/prompt-caching)\n- 🍰 Improved output quality with [Anthropic's long-context prompt format](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/long-context-tips)\n- 🌀 Optimal [closed-form linear query adapter](src/raglite/_query_adapter.py) by solving an [orthogonal Procrustes problem](https://en.wikipedia.org/wiki/Orthogonal_Procrustes_problem)\n\n##### Extensible\n\n- 🔌 A built-in [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server that any MCP client like [Claude desktop](https://claude.ai/download) can connect with\n- 💬 Optional customizable ChatGPT-like frontend for [web](https://docs.chainlit.io/deploy/copilot), [Slack](https://docs.chainlit.io/deploy/slack), and [Teams](https://docs.chainlit.io/deploy/teams) with [Chainlit](https://github.com/Chainlit/chainlit)\n- ✍️ Optional conversion of any input document to Markdown with [Pandoc](https://github.com/jgm/pandoc)\n- 🔎 Optional high-quality document processing with [Mistral OCR](https://docs.mistral.ai/capabilities/document/) for PDFs, images, DOCX, and PPTX with automatic image descriptions\n- ✅ Optional evaluation of retrieval and generation performance with [Ragas](https://github.com/explodinggradients/ragas)\n\n## Installing\n\n> [!TIP]\n> 🚀 If you want to use local models, it is recommended to install [an accelerated llama-cpp-python precompiled binary](https://github.com/abetlen/llama-cpp-python?tab=readme-ov-file#supported-backends) with:\n> ```sh\n> # Configure which llama-cpp-python precompiled binary to install (⚠️ not every combination is available):\n> LLAMA_CPP_PYTHON_VERSION=0.3.9\n> PYTHON_VERSION=310|311|312\n> ACCELERATOR=metal|cu121|cu122|cu123|cu124\n> PLATFORM=macos","github_created_at":"2024-06-10T09:05:57+00:00","created_at":"2026-07-11T11:34:12.92307+00:00","updated_at":"2026-09-20T06:22:15.792706+00:00","categories":[{"slug":"data-retrieval","name":"Data & Retrieval","url":"https://www.graphcanon.com/categories/data-retrieval","markdown_url":"https://www.graphcanon.com/categories/data-retrieval.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/data-retrieval"},{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"}],"tags":[{"slug":"chainlit","name":"chainlit"},{"slug":"colbert","name":"colbert"},{"slug":"duckdb","name":"duckdb"},{"slug":"evals","name":"evals"},{"slug":"late-chunking","name":"late-chunking"},{"slug":"late-interaction","name":"late-interaction"},{"slug":"llm","name":"llm"},{"slug":"markdown","name":"markdown"}],"trust":{"provenance":{"is_fork":false,"github_id":812973394,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-09-20T06:22:12.921Z","maintenance":{"label":"Steady","score":60,"methodology":"github_public_v1","releases_90d":0,"days_since_push":33,"last_release_at":"2026-05-18T07:31:24Z","stars_delta_30d":6,"open_issues_delta_30d":1},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T11:34:14.219Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-09-20T06:22:14.028Z"},"deploy":{"source":"dockerfile:Dockerfile","self_host":true,"observed_at":"2026-09-20T06:22:14.028Z","managed_saas":false},"has_cli":{"value":true,"source":"pyproject.toml:[project.scripts]","observed_at":"2026-09-20T06:22:14.028Z"},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-09-20T06:22:14.028Z"},"has_docker":{"value":true,"source":"dockerfile:Dockerfile","observed_at":"2026-09-20T06:22:14.028Z"},"license_spdx":{"value":"MPL-2.0","source":"github.license","observed_at":"2026-09-20T06:22:14.028Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["- You need to leverage Retriever-Reader architectures specifically optimized for either DuckDB or PostgreSQL backend databases.","- Your application requires a Python-based solution without the overhead of additional language binding requirements."],"when_not_to_use":["- The project demands integration with RAG systems that natively support database backends other than DuckDB and PostgreSQL, as RAGLite is limited to these two options.","- You are looking for a more generalized framework that supports multiple vector search engines besides those compatible with DuckDB or PostgreSQL."],"source":"enrich:decision_facts","observed_at":"2026-07-12T01:08:51.445Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"RAGLite offers specialized capabilities for integrating Retrieval-Augmented Generation (RAG) models with DuckDB or PostgreSQL."}]}}