zilliztech/akcio là một trong những repo tích hợp AI mà TopGit theo dõi, hiện có 257 sao, viết chủ yếu bằng Python. Akcio is a demonstration project for Retrieval Augmented Generation (RAG). It leverages the power of LLM to generate responses and uses vector databases to fetch relevant documents to enhance the quality and relevance of the output.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Akcio: Enhancing LLM-Powered ChatBot with CVP Stack
OSSChat |
Documentation |
Contact |
LICENSE
Index
Overview
Deployment
Load Data
Notice
ChatGPT has constraints due to its limited knowledge base, sometimes resulting in hallucinating answers when asked about unfamiliar topics. We are introducing the new AI stack, ChatGPT+Vector database+prompt-as-code, or the CVP Stack, to overcome this constraint.
We have built OSSChat as a working demonstration of the CVP stack. Now we are presenting the technology behind OSSChat in this repository with a code name of Akcio.
With this project, you are able to build a knowledge-enhanced ChatBot using LLM service like ChatGPT.
By the end, you will learn how to start a backend service using FastAPI, which provides standby APIs to support further applications. Alternatively, we show how to use Gradio to build an online demo.
Overview
Akcio allows you to create a ChatGPT-like system with added intelligence obtained through semantic search of customized knowledge base.
Instead of sending the user query directly to LLM service, our system firstly retrieves relevant information from stores by semantic search or keyword match. Then it feeds both user needs and helpful information into LLM. This allows LLM to better tailor its response to the user's needs and provide more accurate and helpful information.
You can find more details and instructions at our documentation.
Akcio offers two AI platforms to choose from: Towhee or LangChain.
It also supports different integrations of LLM service and databases:
Towhee
LangChain
LLM
OpenAI
✓
✓
Llama-2
✓
Dolly
✓
✓
Ernie
✓
✓
MiniMax
✓
✓
DashScope
✓
ChatGLM
✓
SkyChat
✓
Embedding
OpenAI
✓
✓
HuggingFace
✓
✓
Vector Store
Zilliz Cloud
✓
✓
Milvus
✓
✓
Scalar Store (Optional)
Elastic
✓
✓
Memory Store
Postgresql
✓
✓
MySQL and MariaDB
✓
SQLite
✓
✓
Oracle
✓
Microsoft SQL Server
✓
Rerank
MS MARCO Cross-Encoders
✓
Option 1: Towhee
The option using Towhee simplifies the process of building a system by providing pre-defined pipelines. These built-in pipelines require less coding and make system building much easier. If you require customization, you can either simply modify configuration or create your own pipeline with rich options of Towhee Operators.
Pipelines
Insert:
The insert pipeline builds a knowledge base by saving documents and corresponding data in database(s).
Search:
The search pipeline enables the question-answering capability powered by information retrieval (semantic search and optional keyword match) and LLM service.
Prompt: a prompt operator prepares messages for LLM by assembling system message, chat history, and the user's query processed by template.
Memory:
The memory storage stores chat history to support context in conversation. (available: most SQL)
Option 2: LangChain
The option using LangChain employs the use of Agent in order to enable LLM to utilize specific tools, resulting in a greater demand for LLM's ability to comprehend tasks and make informed decisions.
Agent
ChatAgent: agent ensembles all modules together to build up qa system.
Other agents (todo)
LLM
ChatLLM: large language model or service to generate answers.
Embedding
TextEncoder: encoder converts each text input to a vector.
Other encoders (todo)
Store
VectorStore: vector database stores document chunks in embeddings, and performs document retrieval via semantic search.
ScalarStore: optional, database stores metadata for each document chunk, which supports additional information retrieval. (available: Elastic)
MemoryStore: memory storage stores chat history to support context in conversation.
DataLoader
DataParser: tool loads data from given source and then splits documents into processed doc chunks.
Deployment
Downloads
$ git clone https://github.com/zilliztech/akcio.git
$ cd akcio
Install dependencies
$ pip install -r requirements.txt
Configure modules
You can configure all arguments by modifying config.py to set up your system with default modules.
LLM
By default, the system will use OpenAI service as the LLM option.
To set your OpenAI API key without modifying the configuration file, you can pass it as environment variable.
$ export OPENAI_API_KEY=your_keys_here
Check how to SWITCH LLM.
If you want to use another supported LLM service, you can change the LLM option and set up for it.
Besides directly modifying the configuration file, you can also set up via environment variables.
For example, to use Llama-2 at local which does not require any account, you just need to change the LLM option:
$ export LLM_OPTION=llama_2
For example, to use Ernie instead of OpenAI, you need to change the option and set up ERNIE Bot SDK token :
By default, the embedding module uses methods from Sentence Transformers to convert text inputs to vectors. Here are some information about the default embedding method:
model: BAAI/bge-base-en
dim: 768
normalization: True
Store
Before getting started, all database services used for store must be running and be configured with write and create access.
Vector Store: You need to prepare the service of vector database in advance. For example, you can refer to Milvus Documents or Zilliz Cloud to learn about how to start a Milvus service.
Scalar Store (Optional): This is optional, only work when USE_SCALAR is true in configuration. If this is enabled (i.e. USE_SCALAR=True), the default scalar store will use Elastic. In this case, you need to prepare the Elasticsearch service in advance.
Memory Store: By default, both LangChain and Towhee mode allow interaction with any database supported by SQLAlchemy 2.0.
The system will use default store configs.
To set up your special connections for each database, you can also export environment variables instead of modifying the configuration file.
For the Vector Store, set ZILLIZ_URI:
$ export ZILLIZ_URI=your_zilliz_cloud_endpoint
$ export ZILLIZ_TOKEN=your_zilliz_cloud_api_key # skip this if using Milvus instance
To use host & port instead of cloud id, you can manually modify the VECTORDB_CONFIG in config.py.
Start service
The main script will run a FastAPI service with default address localhost:8900.
Option 1: using Towhee
$ python main.py --towhee
Option 2: using LangChain
$ python main.py --langchain
Access via browser
You can open url http://localhost:8900/docs in browser to access the web service.
/: Check service status
/answer: Generate answer for the given question, with assigned session_id and project
/project/add: Add data to project (will create the project if not exist)
/project/drop: Drop project including delete data in both vector and memory storages.
Check Online Operations to learn more about these APIs.
Load data
The insert function in operations loads project data from url(s) or file(s).
There are 2 options to load project data:
Option 1: Offline
We recommend this method, which loads data in separate steps.
There is also advanced options to load document, for example, generating and inserting potential questions for each doc chunk.
Refer to offline_tools for instructions.
Option 2. Online
When the FastAPI service is up, you can use the POST request http://localhost:8900/project/add to load data.
zilliztech/akcio thuộc nhóm AI Tools trên TopGit, cùng 18 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về zilliztech/akcio ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/zilliztech/akcio là nguồn chính thức.
Vì sao zilliztech/akcio được xếp vào nhóm AI Tools?
TopGit xếp zilliztech/akcio vào nhóm AI Tools dựa trên GitHub topics và mô tả của repo (gắn thẻ: "artificial-intelligence", "chatbot", "chatgpt"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
zilliztech/akcio có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho zilliztech/akcio. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
zilliztech/akcio có trang demo không?
Dự án có trang chủ ở https://github.com/zilliztech/akcio/wiki. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
zilliztech/akcio là gì?
zilliztech/akcio (zilliztech/akcio) là dự án Python trên GitHub. Theo mô tả gốc: Akcio is a demonstration project for Retrieval Augmented Generation (RAG). It leverages the power of LLM to generate responses and uses vector databases to fetch relevant documents to enhance the quality and relevance of the output.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc akcio có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về akcio.