{"id":28398264,"url":"https://github.com/shreydan/naive-rag-compose","last_synced_at":"2026-05-04T13:33:05.533Z","repository":{"id":295316240,"uuid":"989784320","full_name":"shreydan/naive-rag-compose","owner":"shreydan","description":"naive rag using docker-compose with multiple services: ingestion, embedding, query, llm-chat + streaming with openrouter/openai","archived":false,"fork":false,"pushed_at":"2025-05-24T20:41:00.000Z","size":137,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-06T18:48:52.545Z","etag":null,"topics":["chatbot","docker","docker-compose","faiss","fastapi","llm","openai-api","retrieval-augmented-generation","vector-database"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shreydan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-05-24T20:22:39.000Z","updated_at":"2025-05-24T20:46:06.000Z","dependencies_parsed_at":"2025-05-24T21:29:23.363Z","dependency_job_id":null,"html_url":"https://github.com/shreydan/naive-rag-compose","commit_stats":null,"previous_names":["shreydan/naive-rag-compose"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shreydan/naive-rag-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreydan%2Fnaive-rag-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreydan%2Fnaive-rag-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreydan%2Fnaive-rag-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreydan%2Fnaive-rag-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shreydan","download_url":"https://codeload.github.com/shreydan/naive-rag-compose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shreydan%2Fnaive-rag-compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32609638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"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":["chatbot","docker","docker-compose","faiss","fastapi","llm","openai-api","retrieval-augmented-generation","vector-database"],"created_at":"2025-06-01T04:37:59.948Z","updated_at":"2026-05-04T13:33:05.513Z","avatar_url":"https://github.com/shreydan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Naive RAG Compose\n\n## Services:\n\n- **embedding**:\n  - embeds using `nomic-ai/nomic-embed-text-v1.5` model: long context, uses `clustering:` and `search_query:` prefixes for better retrieval.\n  - uses FAISS db with local saving with docker volume\n  - RAG search with FAISS index.search, default k=5\n\n- **ingestion**:\n  - file upload for text and markdown\n\n- **query**:\n  - query database with `embedding` service\n\n- **llm**:\n  - uses openrouter models (here: gemma3n) using openAI library for consistency.\n  - add your API key while using in `./llm-service/.env`\n  - streaming support\n  - gradio UI support\n  - file upload for RAG from frontend\n\n## To run:\n\n- huggingface embedding model setup\n  \n    ```bash\n    python3 -m venv .venv\n    source ./.venv/bin/activate\n    pip install transformers einops httpx\n    mkdir ./embedding-service/model_weights\n    ```\n\n    ```py\n    from transformers import AutoModel, AutoTokenizer\n    tokenizer = AutoTokenizer.from_pretrained('bert-base-uncased',cache_dir='./embedding-service/model_weights')\n    model = AutoModel.from_pretrained('nomic-ai/nomic-embed-text-v1.5', trust_remote_code=True, safe_serialization=True,cache_dir='./embedding-service/model_weights')\n    ```\n\n- docker compose\n    ```\n    sudo docker compose up --build\n    ```\n\n- pip requirements and env vars for each service are in their respective dirs. \n\n- frontend UI will be accessible at `http://localhost:8004/`\n\n- basic tests included in ./tests dir to check upload and query endpoints\n\n# UI\n\n\u003e the queries here are based on my personal private doc, any LLM has zero knowledge of it, so RAG works!\n![ui](./ui.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreydan%2Fnaive-rag-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshreydan%2Fnaive-rag-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshreydan%2Fnaive-rag-compose/lists"}