https://github.com/whybe-choi/advanced-rag-project
Advanced Dr.KHU using LlamaIndex ๐ฆ
https://github.com/whybe-choi/advanced-rag-project
cohere fastapi llama-index playwright-python streamlit
Last synced: 3 months ago
JSON representation
Advanced Dr.KHU using LlamaIndex ๐ฆ
- Host: GitHub
- URL: https://github.com/whybe-choi/advanced-rag-project
- Owner: whybe-choi
- License: mit
- Created: 2024-06-04T08:45:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-19T01:59:22.000Z (about 1 year ago)
- Last Synced: 2024-10-06T08:44:13.385Z (9 months ago)
- Topics: cohere, fastapi, llama-index, playwright-python, streamlit
- Language: Python
- Homepage:
- Size: 49 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dr.KHU : ์๋ฃ ์๋ด ์ฑ๋ด ๐ค
Advanced Dr.KHU using LlamaIndex ๐ฆ
![]()
## Introduction
์๋์ ์ด๋ฏธ์ง๋ [Medium - Corca : LLM Multi Agent: Customer Service๋ฅผ ๊ธฐ๊น๋๊ฒ ์๋ํํ๋ ๋ฐฉ๋ฒ](https://medium.com/corca/llm-multi-agent-customer-service%EB%A5%BC-%EA%B8%B0%EA%B9%94%EB%82%98%EA%B2%8C-%EC%9E%90%EB%8F%99%ED%99%94%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95-2eaec7654385)์์ ๋ฐ์ทํ ์ด๋ฏธ์ง์ ๋๋ค. ํด๋น ์ด๋ฏธ์ง์ ๋์ผํ ๊ธฐ๋ฅ์ ํ๋๋ก ์ฝ๋๋ฅผ ๊ฐ์ ํ๊ณ ์๋ ์ค์ ๋๋ค.![]()
> 1. Leader Agent๊ฐ Key Point Analyzer Agent์๊ฒ ๋ณต์กํ ์ง๋ฌธ์ ๊ฐ๋จํ ์ฌ๋ฌ ๊ฐ์ Sub-question์ผ๋ก ๋๋ ๋ฌ๋ผ๊ณ ์์ฒญํฉ๋๋ค.
> 2. Leader Agent๊ฐ Sub-question ๋ชฉ๋ก์ ๋ฐ์ผ๋ฉด ๊ฐ๊ฐ์ Sub-question์ ๋ํ์ฌ Question Answerer Agent์ ์์ฑํ๊ณ ๋ตํด๋ฌ๋ผ๊ณ ์์ฒญํฉ๋๋ค.
> 3. ์ด๋ Question Answerer Agent๋ ๊ฐ Sub-question์ ํ์ํ ์ ๋ณด๋ฅผ Vector Store์์ ์ฐพ์์์ ์ด๋ฅผ ์ฐธ๊ณ ํ์ฌ ๋ตํฉ๋๋ค.
> 4. Leader Agent๋ ๊ฐ๊ฐ์ Sub-Question์ ๋ํ ๋ต์ ํฉํ์ฌ ์ฌ์ฉ์ ์ง์์ ๋ํ ๋ต์ ์์ฑํ๊ณ , Reviewer Agent์๊ฒ ๊ฒํ ํด๋ฌ๋ผ๊ณ ์์ฒญํฉ๋๋ค.
> 5. Reviewer Agent๋ Leader Agent๋ก๋ถํฐ ์ ๋ฌ๋ฐ์ ๋ต๋ณ์ ๋ํ ํผ๋๋ฐฑ์ ๋งํฉ๋๋ค. Leader Agent๋ ๊ทธ ํผ๋๋ฐฑ์ ๋ฐ์ํ์ฌ ์ต์ข ๋ต๋ณ์ ์์ฑํ ํ ์ฌ์ฉ์์๊ฒ ์ ๋ฌํฉ๋๋ค.## How to use
1. ๊ฐ์ํ๊ฒฝ ์ค์
```shell
git clone https://github.com/whybe-choi/advanced-rag-project.git
cd advanced-rag-project
python -m venv venv
source venv/bin/activate
```2. playwright ์ค์น
```shell
playwright install
```3. ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น
```shell
pip install -r requirements.txt
```4. ๋ฐ์ดํฐ ํฌ๋กค๋ง
```shell
python crawling_faq.py
```5. ChromaDB ์์ฑ
```shell
python upload.py
```6. `.env.example`์ `.env`๋ก ๋ฐ๊พธ๊ณ `CO_API_KEY` ์ ๋ ฅ
```text
CO_API_KEY=your-api-key
```7. streamlit ์คํ
```shell
streamlit run app.py
```