|
|
--- |
|
|
title: LoL Lore |
|
|
emoji: 💬 |
|
|
colorFrom: yellow |
|
|
colorTo: purple |
|
|
sdk: gradio |
|
|
sdk_version: 5.0.1 |
|
|
app_file: app.py |
|
|
pinned: false |
|
|
short_description: A chatbot using RAG with Langchain and Hugging face model |
|
|
--- |
|
|
|
|
|
An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index). |
|
|
|
|
|
Steps: |
|
|
- Retrieve text data from website using Beautifulsoup |
|
|
- Clean the data |
|
|
- Chunk the text base on token character split using Langchain |
|
|
- Use bm25 frequency based as a retriever as characters name are unique and have better results finding similar text to the query. Additionally it takes less time than embedding |
|
|
- Promp engineering on the system (Adding context on system and update it each query or adding context on the user message). I chose to put it in the user message as results are better. |
|
|
- Use open source to correct user queries syntax and grammar and for the chatbot |
|
|
- Build gradio app |