{"id":34982511,"url":"https://github.com/slava-vishnyakov/rag_engine","last_synced_at":"2025-12-27T01:02:41.750Z","repository":{"id":251882271,"uuid":"838727762","full_name":"slava-vishnyakov/rag_engine","owner":"slava-vishnyakov","description":"Python package for implementing Retrieval-Augmented Generation (RAG) using OpenAI's embeddings and a SQLite database with vector search capabilities","archived":false,"fork":false,"pushed_at":"2024-12-28T07:33:20.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-25T13:56:32.396Z","etag":null,"topics":["ai","chatbot","embeddings","information-retrieval","language-models","machine-learning","natural-language-processing","nlp","openai","python","rag","retrieval-augmented-generation","semantic-search","sqlite","vector-search"],"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/slava-vishnyakov.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":"2024-08-06T08:17:50.000Z","updated_at":"2025-01-26T00:02:48.000Z","dependencies_parsed_at":"2024-12-28T08:21:32.682Z","dependency_job_id":"7c03051f-f333-491f-a26c-0b3e06659ff0","html_url":"https://github.com/slava-vishnyakov/rag_engine","commit_stats":null,"previous_names":["slava-vishnyakov/rag_engine"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/slava-vishnyakov/rag_engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slava-vishnyakov%2Frag_engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slava-vishnyakov%2Frag_engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slava-vishnyakov%2Frag_engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slava-vishnyakov%2Frag_engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slava-vishnyakov","download_url":"https://codeload.github.com/slava-vishnyakov/rag_engine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slava-vishnyakov%2Frag_engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28067126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-26T02:00:06.189Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ai","chatbot","embeddings","information-retrieval","language-models","machine-learning","natural-language-processing","nlp","openai","python","rag","retrieval-augmented-generation","semantic-search","sqlite","vector-search"],"created_at":"2025-12-27T01:02:40.823Z","updated_at":"2025-12-27T01:02:41.715Z","avatar_url":"https://github.com/slava-vishnyakov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RAG Engine: Powerful Retrieval-Augmented Generation for Python\n\n[![Python Tests](https://github.com/slava-vishnyakov/rag_engine/actions/workflows/python-tests.yml/badge.svg)](https://github.com/slava-vishnyakov/rag_engine/actions/workflows/python-tests.yml)\n\nRAG Engine is a high-performance Python package for implementing Retrieval-Augmented Generation (RAG) using OpenAI's advanced embeddings and a SQLite database with efficient vector search capabilities. Enhance your natural language processing and machine learning projects with state-of-the-art semantic search and text generation.\n\n## Installation\n\nYou can install the RAG Engine package using pip:\n\n```\npip install rag_engine\n```\n\n## Usage\n\nHere's a quick example of how to use RAG Engine:\n\n```python\nfrom rag_engine import RAGEngine\n\n# Initialize the RAG Engine\nrag = RAGEngine(\"database.sqlite\", api_key='...your OpenAI key...')\n# or set OPENAI_API_KEY env var\n\n# Add some sentences\nsentences = [\"This is a test sentence.\", \"Another example sentence.\"]\nrag.add(sentences)\n\n# Search for similar sentences\nresults = rag.search(\"test sentence\", n=2)\nprint(results)\n\n```\n\n## Key Features\n\n- **Advanced Embedding Models**: Supports multiple OpenAI embedding models including ADA_002, SMALL_3, and LARGE_3 for versatile text representation\n  `rag_ada = RAGEngine(db_file1, api_key, model=ADA_002)`, `rag_small = RAGEngine(db_file2, api_key, model=SMALL_3, size=512)`\n- **High-Performance Asynchronous Operations**: Optimized for speed and efficiency in handling large-scale data\n- **Powerful Vector Similarity Search**: Utilizes SQLite database with built-in vector search capabilities for fast and accurate retrieval\n- **Flexible and Intuitive API**: Easy-to-use interface for adding, searching, and managing embeddings in your RAG pipeline\n- **Seamless Integration**: Designed to work smoothly with existing NLP and machine learning workflows\n\n## Development and Contribution\n\nWe welcome contributions to enhance RAG Engine's capabilities. To set up the development environment:\n\n1. Clone the repository: `git clone https://github.com/slava-vishnyakov/rag_engine.git`\n2. Install the package with development dependencies:\n   ```\n   pip install -e .[dev]\n   ```\n3. Run the comprehensive test suite:\n   ```\n   pytest\n   ```\n\nNote: Running tests requires a valid OpenAI API key. Set the `OPENAI_API_KEY` environment variable before executing the tests.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslava-vishnyakov%2Frag_engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslava-vishnyakov%2Frag_engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslava-vishnyakov%2Frag_engine/lists"}