{"id":13583871,"url":"https://github.com/snexus/llm-search","last_synced_at":"2025-05-14T21:08:02.894Z","repository":{"id":162637165,"uuid":"627915388","full_name":"snexus/llm-search","owner":"snexus","description":"Querying local documents, powered by LLM","archived":false,"fork":false,"pushed_at":"2025-01-12T03:42:34.000Z","size":13266,"stargazers_count":579,"open_issues_count":5,"forks_count":67,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-06T17:02:49.127Z","etag":null,"topics":["chatbot","chroma","hyde","langchain-python","large-language-models","llm","openai-chatgpt","rag","reranking","retrieval-augmented-generation","splade","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/snexus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-04-14T13:33:44.000Z","updated_at":"2025-04-04T04:29:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"1f7107a2-978f-49ff-80cf-1631bf2b8dde","html_url":"https://github.com/snexus/llm-search","commit_stats":{"total_commits":191,"total_committers":5,"mean_commits":38.2,"dds":"0.32460732984293195","last_synced_commit":"593e6f014b55c4c0db7978c2fd89f0aa639ef958"},"previous_names":["snexus/llm-playground"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snexus%2Fllm-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snexus%2Fllm-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snexus%2Fllm-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snexus%2Fllm-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snexus","download_url":"https://codeload.github.com/snexus/llm-search/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248766687,"owners_count":21158302,"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","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","chroma","hyde","langchain-python","large-language-models","llm","openai-chatgpt","rag","reranking","retrieval-augmented-generation","splade","streamlit"],"created_at":"2024-08-01T15:03:51.674Z","updated_at":"2025-04-13T19:21:01.727Z","avatar_url":"https://github.com/snexus.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook","chatbot","📚 Projects (1974 total)","streamlit","MCP Servers"],"sub_categories":["MCP Servers","Knowledge \u0026 Memory"],"readme":"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://githubtocolab.com/snexus/llm-search/blob/main/notebooks/llmsearch_google_colab_demo.ipynb)\n\n# pyLLMSearch - Advanced RAG\n\n[Documentation](https://llm-search.readthedocs.io/en/latest/)\n\nThe purpose of this package is to offer a convenient question-answering (RAG) system with a simple YAML-based configuration that enables interaction with multiple collections of local documents. Special attention is given to improvements in various components of the system **in addition to basic LLM-based RAGs** - better document parsing, hybrid search, HyDE enabled search, chat history, deep linking, re-ranking, the ability to customize embeddings, and more. The package is designed to work with custom Large Language Models (LLMs) – whether from OpenAI or installed locally.\n\n## Features\n\n* Supported document formats\n    * Build-in parsers:\n        * `.md` - Divides files based on logical components such as headings, subheadings, and code blocks. Supports additional features like cleaning image links, adding custom metadata, and more.\n        * `.pdf` - MuPDF-based parser.\n        * `.docx` - custom parser, supports nested tables.\n    * Other common formats are supported by `Unstructured` pre-processor:\n        * List of formats see [here](https://unstructured-io.github.io/unstructured/core/partition.html).\n\n* Allows interaction with embedded documents, internally supporting the following models and methods (including locally hosted):\n    * OpenAI models (ChatGPT 3.5/4 and Azure OpenAI).\n    * HuggingFace models.\n    * Llama cpp supported models - for full list see [here](https://github.com/ggerganov/llama.cpp#description).\n\n* Interoperability with LiteLLM + Ollama via OpenAI API, supporting hundreds of different models (see [Model configuration for LiteLLM](sample_templates/llm/litellm.yaml))\n\n* Generates dense embeddings from a folder of documents and stores them in a vector database ([ChromaDB](https://github.com/chroma-core/chroma)).\n  * The following embedding models are supported:\n    * Hugging Face embeddings.\n    * Sentence-transformers-based models, e.g., `multilingual-e5-base`.\n    * Instructor-based models, e.g., `instructor-large`.\n    * OpenAI embeddings.\n\n* Generates sparse embeddings using SPLADE (https://github.com/naver/splade) to enable hybrid search (sparse + dense).\n\n* An ability to update the embeddings incrementally, without a need to re-index the entire document base.\n\n* Support for table parsing via open-source gmft (https://github.com/conjuncts/gmft) or Azure Document Intelligence.\n\n* Optional support for image parsing using Gemini API.\n\n* Supports the \"Retrieve and Re-rank\" strategy for semantic search, see [here](https://www.sbert.net/examples/applications/retrieve_rerank/README.html).\n    * Besides the originally `ms-marco-MiniLM` cross-encoder, more modern `bge-reranker` is supported.\n\n* Supports HyDE (Hypothetical Document Embeddings) - see [here](https://arxiv.org/pdf/2212.10496.pdf).\n    * WARNING: Enabling HyDE (via config OR webapp) can significantly alter the quality of the results. Please make sure to read the paper before enabling.\n    * From my own experiments, enabling HyDE significantly boosts quality of the output on a topics where user can't formulate the quesiton using domain specific language of the topic - e.g. when learning new topics.\n\n* Support for multi-querying, inspired by `RAG Fusion` - https://towardsdatascience.com/forget-rag-the-future-is-rag-fusion-1147298d8ad1\n    * When multi-querying is turned on (either config or webapp), the original query will be replaced by 3 variants of the same query, allowing to bridge the gap in the terminology and \"offer different angles or perspectives\" according to the article.\n\n* Supprts optional chat history with question contextualization\n\n\n* Other features\n    * Simple CLI and web interfaces.\n    * Deep linking into document sections - jump to an individual PDF page or a header in a markdown file.\n    * Ability to save responses to an offline database for future analysis.\n    * Experimental API\n\n\n## Demo\n\n![Demo](media/llmsearch-demo-v2.gif)\n\n\n## Documentation\n\n[Browse Documentation](https://llm-search.readthedocs.io/en/latest/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnexus%2Fllm-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnexus%2Fllm-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnexus%2Fllm-search/lists"}