A powerful AI chatbot capable of providing real-time answers to technical questions by accessing documentation from various tools and services.
- AWS Documentation
- dbt Documentation
- dbt Project Evaluator
- Fivetran Documentation
- Looker Documentation
- Prefect Documentation
- Python (Langchain) Documentation
- Snowflake Documentation
- Streamlit Documentation
Interact with the chatbot by sending your technical questions related to the supported tools and services. The chatbot will provide real-time responses by fetching relevant information from the specified documentation sources.
A typical dialogue with the AI, fetching a relevant response from Snowflake documentation.
To effectively handle a user’s question, the system performs the following steps:
- Query Generation: Utilize a Large Language Model (LLM) to generate a comprehensive set of queries based on the provided user input.
- Search Execution: Conduct searches for each of the generated queries.
- URL Storage: Collect and store the URLs obtained from the search results in
self.urls
. - URL Check: Identify any URLs that are new and have not been processed previously, ensuring they do not exist in
self.url_database
. - Content Transformation and Storage: Load, transform, and add these new URLs exclusively to the vectorstore.
- Relevant Document Retrieval: Query the vectorstore for documents that are relevant to the questions generated by the LLM.
- Final Result Preparation: Ensure that only unique documents are selected, compiling them to form the final result set.
You only need to supply a few things.
In settings()
function, supply:
- Search: Select the search tool you want to use (e.g., GoogleSearchAPIWrapper).
- Vectorstore: Select the vectorstore and embeddings you want to use (e.g., Chroma, OpenAIEmbeddings).
- Select the LLM you want to use (e.g., ChatOpenAI).
To use st.secrets
set enviorment variables in .streamlit/secrets.toml
file.
Or, simply add environemnt variables and remove st.secrets
:
import os
os.environ["GOOGLE_API_KEY"] = "YOUR_API_KEY"
os.environ["GOOGLE_CSE_ID"] = "YOUR_CSE_ID"
os.environ["OPENAI_API_BASE"] = "https://api.openai.com/v1"
os.environ["OPENAI_API_KEY"] = "YOUR_API_KEY"
-
GOOGLE_API_KEY
: Obtainable from Google Cloud Console. -
GOOGLE_CSE_ID
: Accessible at Google Programmable Search Engine, requiring site configuration. -
OPENAI_API_KEY
: Retrieve from OpenAI API Keys.
python3.9 -m venv venv && source venv/bin/activate && pip3 install --upgrade pip && pip3 install -r requirements.txt && streamlit run technical-documentation-ai.py
py -m venv venv; .\venv\Scripts\Activate.ps1; python -m pip install --upgrade pip; pip install -r requirements.txt; streamlit run app.py