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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file qnabot-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: qnabot-0.0.3-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 | aa8257c96235fd591ad4e3eb8e111532ed0fdfcbcd0183a700f831c6bec33d0c |
|
MD5 | b88ee2e913ec872ed7a65ba6cb4fb042 |
|
BLAKE2b-256 | b5a64b58ebd6c5f8453ef6f7145c16b7a24c4c8891d6733002b1bba0bafad459 |