{"id":37682085,"url":"https://github.com/mfmezger/aleph-alpha-rag","last_synced_at":"2026-01-17T16:27:44.004Z","repository":{"id":214201450,"uuid":"735882384","full_name":"mfmezger/aleph-alpha-rag","owner":"mfmezger","description":"RAG Backend for Aleph Alpha LLMs.","archived":true,"fork":false,"pushed_at":"2024-06-01T10:20:37.000Z","size":1254,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-16T22:53:04.699Z","etag":null,"topics":["alephalpha","llms","poetry","qdrant","qdrant-vector-database","rag","retrieval-augmented-generation"],"latest_commit_sha":null,"homepage":"","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/mfmezger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2023-12-26T10:53:38.000Z","updated_at":"2024-10-23T13:37:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"8fe59153-feee-47ec-b66a-c75f8e4ae9e9","html_url":"https://github.com/mfmezger/aleph-alpha-rag","commit_stats":null,"previous_names":["mfmezger/aleph-alpha-rag"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mfmezger/aleph-alpha-rag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfmezger%2Faleph-alpha-rag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfmezger%2Faleph-alpha-rag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfmezger%2Faleph-alpha-rag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfmezger%2Faleph-alpha-rag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfmezger","download_url":"https://codeload.github.com/mfmezger/aleph-alpha-rag/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfmezger%2Faleph-alpha-rag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"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":["alephalpha","llms","poetry","qdrant","qdrant-vector-database","rag","retrieval-augmented-generation"],"created_at":"2026-01-16T12:27:16.165Z","updated_at":"2026-01-17T16:27:43.985Z","avatar_url":"https://github.com/mfmezger.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\n# RAG with Aleph Alpha \u0026 Langchain \u0026 Qdrant Vector Database\n\n\n- [RAG with Aleph Alpha \\\u0026 Langchain \\\u0026 Qdrant Vector Database](#rag-with-aleph-alpha--langchain--qdrant-vector-database)\n  - [Quickstart](#quickstart)\n  - [Project Description](#project-description)\n  - [Semantic Search](#semantic-search)\n  - [Architecture](#architecture)\n  - [Components](#components)\n  - [Secret Management](#secret-management)\n  - [Installation \\\u0026 Development Backend](#installation--development-backend)\n  - [Development Frontend](#development-frontend)\n  - [Vector Database](#vector-database)\n  - [Qdrant API Key](#qdrant-api-key)\n\n\n\n## Quickstart\nTo run the complete system with docker use this command:\n\n```bash\ngit clone https://github.com/mfmezger/aleph-alpha-rag.git\ncd aleph-alpha-rag\n```\nCreate a .env file from the .env-template and set the qdrant api key. For tests just set it to test.\nQDRANT_API_KEY=\"test\"\n\nThen start the system with\n```bash\n  docker compose up -d\n```\n\nThen go to http://127.0.0.1:8001/docs or http://127.0.0.1:8001/redoc to see the API documentation.\n\nFrontend: localhost:8501\nQdrant Dashboard: localhost:6333/dashboard\n\n\n## Project Description\nThis project is a conversational aleph_alpha_rag that uses Aleph Alpha and OpenAI Large Language Models to generate responses to user queries. The aleph_alpha_rag also includes a vector database and a REST API built with FastAPI.\n\nFeatures\n- Uses Aleph Alpha to generate responses to user queries.\n- Includes a vector database to store and retrieve information.\n- Provides a REST API built with FastAPI for easy integration with other applications.\n- Has a basic gui.\n\n## Semantic Search\n![Semantic Search Architecture](resources/search_flow.png)\n\nSemantic search is an advanced search technique that aims to understand the meaning and context of a user's query, rather than matching keywords. It involves natural language processing (NLP) and machine learning algorithms to analyze and interpret user intent, synonyms, relationships between words, and the structure of content. By considering these factors, semantic search improves the accuracy and relevance of search results, providing a more intuitive and personalized user experience.\n\n## Architecture\n![Semantic Search Architecture](resources/Architecture.png)\n\n## Components\n\nLangchain is a library for natural language processing and machine learning. FastAPI is a modern, fast (high-performance) web framework for building APIs with Python 3.7+ based on standard Python type hints. A Vectordatabase is a database that stores vectors, which can be used for similarity searches and other machine learning tasks.\n\n## Secret Management\n\nTwo ways to manage your api keys are available, the easiest approach is to sent the api token in the request as the token.\nAnother possiblity is to create a .env file and add the api token there.\nIf you use OpenAI from Azure or OpenAI directly you need to set the correct parameters in the .env file.\n\n\n## Installation \u0026 Development Backend\n\nFirst install Python Dependencies:\n\n```bash\npip install poetry\npoetry install\n```\n\nStart the complete system with:\n\n```bash\ndocker compose up -d\n```\n\nTo run the Qdrant Database local just run:\n\n```bash\ndocker compose up qdrant\n```\n\n\nTo run the Backend use this command in the root directory:\n\n```bash\npoetry run uvicorn aleph_alpha_rag.api:app --reload\n```\n\nTo run the tests you can use this command:\n\n```bash\npoetry run coverage run -m pytest -o log_cli=true -vvv tests\n```\n\nTo update all dependencies use this command:\n\n```bash\npoetry add langchain@latest streamlit@latest loguru@latest omegaconf@latest aleph-alpha-client@latest python-dotenv@latest httpx@latest python-multipart@latest fastapi@latest grpcio@latest grpcio-tools@latest qdrant-client@latest uvicorn@latest nltk@latest pypdfium2@latest lingua-language-detector@latest pyarrow@latest aiohttp@latest\n```\n\n## Development Frontend\n\nTo run the Frontend use this command in the root directory:\n\n```bash\npoetry run streamlit run gui.py --theme.base=\"dark\"\n```\n\n## Vector Database\n\nQdrant Dashboard is available at http://127.0.0.1:6333/dashboard. There you need to enter the api key.\n\n\n\n## Qdrant API Key\nTo use the Qdrant API you need to set the correct parameters in the .env file.\nQDRANT_API_KEY is the API key for the Qdrant API.\nAnd you need to change it in the qdrant.yaml file in the config folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfmezger%2Faleph-alpha-rag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfmezger%2Faleph-alpha-rag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfmezger%2Faleph-alpha-rag/lists"}