Create a question answering over docs bot with one line of code.
Project description
QnA Bot
Create a question answering over docs bot with one line of code:
from qnabot import QnABot
import os
os.environ["OPENAI_API_KEY"] = "my key"
bot = QnABot(directory="./mydata")
Here's how it works
High level overview what is happening under the hood:
sequenceDiagram
actor User
participant API
participant LLM
participant Vectorstore
participant IngestionEngine
participant DataLake
autonumber
Note over API, DataLake: Ingestion phase
loop Every X time
IngestionEngine ->> DataLake: Load documents
DataLake -->> IngestionEngine: Return data
IngestionEngine -->> IngestionEngine: Split documents and Create embeddings
IngestionEngine ->> Vectorstore: Store documents and embeddings
end
Note over API, DataLake: Generation phase
User ->> API: Receive user question
API ->> Vectorstore: Lookup documents in the index relevant to the question
API ->> API: Construct a prompt from the question and any relevant documents
API ->> LLM: Pass the prompt to the model
LLM -->> API: Get response from model
API -->> User: Return response
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qnabot-0.0.2.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file qnabot-0.0.2.tar.gz
.
File metadata
- Download URL: qnabot-0.0.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d157ff0f37c455a76cbe471838c70e2bc1d73849a73580f8f488a581001c046 |
|
MD5 | afa3d08a2e9bad23eea4fa5177964545 |
|
BLAKE2b-256 | 8bc671ce39b0411b9e45fd78abe35c8111ee4205f63e14588bbc7233b6e1b1d2 |
File details
Details for the file qnabot-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: qnabot-0.0.2-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ab350321659d8b346739339f68e18003504cc1b242fc5801216bc23f23e235b |
|
MD5 | 5c6d764509f57392bd4af233c119e7d0 |
|
BLAKE2b-256 | a0b40d414745b40c8cbace034f82e7800338e468e1b06824fc77305924065519 |