{"id":15165943,"url":"https://github.com/gurveervirk/tichat","last_synced_at":"2026-03-07T17:06:28.158Z","repository":{"id":254398697,"uuid":"846409492","full_name":"gurveervirk/TiChat","owner":"gurveervirk","description":"Simple, High Quality, RAG application using TiDB vector store","archived":false,"fork":false,"pushed_at":"2024-08-23T14:42:15.000Z","size":1413,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T06:51:17.756Z","etag":null,"topics":["bootstrap5","flask","llama-index","ollama","rag","react","tidb","tidbcloud","vector-index"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gurveervirk.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-23T06:31:30.000Z","updated_at":"2024-08-23T14:42:18.000Z","dependencies_parsed_at":"2024-09-13T22:42:35.796Z","dependency_job_id":"cfbd711e-542e-474f-83e8-d794087ef977","html_url":"https://github.com/gurveervirk/TiChat","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.5,"last_synced_commit":"b2c6adca06141a1a96a4e4e82611447162ce6936"},"previous_names":["gurveervirk/tichat"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gurveervirk%2FTiChat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gurveervirk%2FTiChat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gurveervirk%2FTiChat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gurveervirk%2FTiChat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gurveervirk","download_url":"https://codeload.github.com/gurveervirk/TiChat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238120378,"owners_count":19419761,"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":["bootstrap5","flask","llama-index","ollama","rag","react","tidb","tidbcloud","vector-index"],"created_at":"2024-09-27T04:20:57.109Z","updated_at":"2025-10-25T10:30:42.785Z","avatar_url":"https://github.com/gurveervirk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TiChat\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg height=\"400\" width=\"400\" alt=\"gurveervirk/TiChat\" src=\"https://github.com/gurveervirk/TiChat/blob/main/app/public/TiChat.png\"\u003e\n\u003c/div\u003e\n\nThis project is a *Simple*, *high quality*, *ChatGPT-esque*, *extensible RAG application*, that makes use of AI models and indices to query documents and retrieve better-informed responses from the models. It allows you to upload your documents that can be used to answer any corresponding queries. It automatically stores your chats for future usage.\n\nA sample online implementation of this project is available [here](https://github.com/gurveervirk/BlenderHelperBot-with-TiDB).\n\n## Prerequisites\n\nThis app has a single dependency that needs to be installed separately:\n- [Ollama](https://ollama.com/download) for quick and easy model download, serving as well as automatic and smart device loading\n\nThis app makes use of TiDB vector store. For quick setup, head over to [TiDB Cloud](https://tidbcloud.com/) and sign up for a free account.\n\nGet the connection string for your database (default: 'test'), after generating the password. Also, download the CA certificate to your system.\n\n## Getting Started\n\n1) Go to the Releases page, and download the latest TiChatInstaller.exe. \n2) Run it and follow the steps to complete the installation.\n3) Go to the installation directory (default: \"C:\\Program Files (x86)\\TiChat\"), and make the following changes to settings.json:\n    - *connectionString* to the connection string for your TiDB cloud account, with ssl_ca = full path to your installed CA cert\n\n**Done! You can now run the application.**\n\n## Usage\n\nStart the app from desktop or start menu after completing the above tasks.\n\nThe app allows the user to simply chat with the bot, if the checkbox is left unchecked, or use the index created with the uploaded documents for better-informed responses.\n\nUpload documents using the top right button.\n\nThis is how it should look like:\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"gurveervirk/TiChat\" src=\"https://github.com/gurveervirk/TiChat/blob/main/misc/ui.png\"\u003e\n\u003c/div\u003e\n\n## Application Explained\n\n### Components:\n1) **Ollama (Local LLM Runtime)**:\n  - Hosts the local LLM model (**Mistral-7B-Instruct-v0.3**).\n  - Runs inference locally for generating responses based on prompts.\n2) **FastEmbedEmbedding (ONNX Model)**:\n  - Runs locally on the CPU.\n  - Generates vector embeddings from text data (e.g., document uploads).\n  - Model: **mixedbread-ai/mxbai-embed-large-v1**.\n3) **TiDB (Vector Store)**:\n  - A distributed, scalable vector database that stores the embeddings.\n  - Provides vector search capabilities.\n4) **Llama-Index (Vector Index)**:\n  - Interface layer between the application and TiDB.\n  - Manages vector indexes and performs efficient retrieval for relevant documents.\n5) **RAG Chatbot Application**:\n  - The main user interface where users interact with the chatbot.\n  - Orchestrates the flow of data between different components.\n\nFrontend has been built using **React** and **Bootstrap 5**.\n\n### Data Flow:\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"gurveervirk/TiChat\" src=\"https://github.com/gurveervirk/TiChat/blob/main/misc/diagram.png\"\u003e\n\u003c/div\u003e\n\nThere are 2 main flows:\n1) If the user does not use the index, it directly calls the LLM, like a normal chatbot app.\n2) If the user checks '_Use Index Querying_', the following occurs:\n- _User Input_: The user inputs a query via the chatbot interface.\n- _Embedding Generation_: The query is passed to the FastEmbedEmbedding ONNX model to generate its vector embedding. The question, along with the previous messages, is condensed into a single question for better response.\n- _Vector Search_: The generated embedding is sent to Llama-Index, which queries TiDB for relevant document embeddings. TiDB returns the most relevant document vectors.\n- _Contextual Response Generation_: The retrieved documents (in their original text form) are provided as context to the LLM model in Ollama. The LLM generates a response based on the query and the retrieved documents.\n- _Response Delivery_: The generated response is displayed to the user through the chatbot interface.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgurveervirk%2Ftichat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgurveervirk%2Ftichat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgurveervirk%2Ftichat/lists"}