-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from ClickHouse/streamlit-app
simple readme for app
- Loading branch information
Showing
2 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Hackbot - A Streamlit chatbot π¬ for Hacker News powered by LlamaIndex π¦ and ClickHouse π | ||
|
||
Simple chatbot app that uses LllamaIndex, ClickHouse, Hacker News posts, and Stack Overflow survey results to allow an LLM (chatbot v4.0) to provide answers on people's opinions on technology. | ||
|
||
Answers are based on two sources held in ClickHouse: | ||
- Hacker News posts with vector embeddings generated by the `sentence-transformers/all-MiniLM-L6-v2` model. | ||
- Stack Overflow survey results allowing statistics to be looked up, e.g., What is the most popular web development framework? These facts are used to provide additional context for querying posts and requesting a response from the LLM. | ||
|
||
For example, users can query for: | ||
|
||
"What are people's opinions on the most popular database?" | ||
|
||
This requires: | ||
|
||
1. Establish the most popular database through a SQL query to ClickHouse. Answer: Postgresql. | ||
2. Query the posts with "What are people's opinions on Postgresql." | ||
3. Provide context to LLM (Chatgpt 4.0) by asking, "What are people's opinions on Postgresql?" | ||
|
||
This relies on Llama index to control the flow via the [`SQLAutoVectorQueryEngine`]() engine. | ||
|
||
|
||
## Requirements | ||
|
||
- ClickHouse 24.1 | ||
- Python 3.11+ | ||
|
||
## Data | ||
|
||
### Table schemas | ||
|
||
|
||
|
||
### Loading | ||
|
||
Hacker News post are for the period upto 2021. Stack Overflow survey results are also for 2021. | ||
|
||
## Run application | ||
|
||
We recommend using a [virtual environment](). | ||
|
||
``` | ||
pip install -r requirements.txt | ||
streamlit run hacker_insights.py | ||
``` | ||
|
||
## Other capabilities | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters