GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - finallyupper/upstage-qa: 24-Fall-NLP LLM docs QA project (1st place), Enhancing Large Language Models (LLMs) provided by Upstage (Solar).

BranchesTags
Open more actions menu

Latest commit

 

History

90 Commits
90 Commits

Folders and files

NameName
Last commit message
Last commit date
assets
assets
 
 
data
data
 
 
db
db
 
 
engine
engine
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
__init__.py
__init__.py
 
 
config.yaml
config.yaml
 
 
main.py
main.py
 
 
prompts.py
prompts.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

UpstageQA

This Repository contains codebase for Enhancing Large Language Models (LLMs) provided by Upstage (Solar). The project offers the pipeline that acheives high performance on given ewha.pdf document and MMLU-Pro dataset. The optimal prompts and multiple knowledge base(KB)s for the Question-and-Answering Tasks are also included in ./db/* and prompts.py.

🌟 Overview

pipeline

πŸ“Getting Started

Requirements

Clone this repository and Create conda environment and install all the dependencies:

git clone https://github.com/finallyupper/24-LLM-Project.git

conda create --name pj python=3.12

conda activate pj

pip install -r requirements.txt

Note for CPU-only Environments
If you do not have a GPU, edit the requirements.txt file as follows before running the installation:

# faiss-gpu-cu12==1.9.0.0
faiss-cpu==1.9.0

You can change various hyperparameters including top k and thresholds in config.yaml. Before start, don't forget to make .env file in the repository and place the following information:

UPSTAGE_API_KEY = ""
LANGCHAIN_TRACING_V2=false
LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
LANGCHAIN_API_KEY=""
LANGCHAIN_PROJECT="24-nlp-0"

How to play πŸ’­

Run the following command to start testing the model:

python main.py

NOTE ) If you get the debugging messages in your terminal as following, it means the codes work correctly!

terminal

Directory Structure

24-LLM-Project/
β”‚
β”œβ”€β”€ README.md         
β”œβ”€β”€ main.py   
β”œβ”€β”€ prompts.py           
β”œβ”€β”€ __init__.py      
β”‚
β”œβ”€β”€ engine/           
β”‚   β”œβ”€β”€ langchain_engine.py
β”‚   β”œβ”€β”€ raptor.py
β”‚   └── utils.py
β”‚   └── preprocess/
|
β”œβ”€β”€ config.yaml 
|
β”œβ”€β”€ data/           
β”‚   β”œβ”€β”€ testset.csv
β”‚   β”œβ”€β”€ ewha.pdf
β”‚   └── ewha_chunk_doc_fix.json 
β”‚   └── ...
β”œβ”€β”€ db/           
β”‚   β”œβ”€β”€ raptor/
β”‚   └──── business/
|   └──── history/  
|   └──── law/
|   └──── philosophy/  
|   └──── psychology/  
|   └──── RAPTOR_faiss_fix_overlap/    
|
β”œβ”€β”€ assets/           
β”‚   β”œβ”€β”€ pipeline.png
β”‚   β”œβ”€β”€ skeleton.ipynb       
β”‚   └── ...

Results

Best Template

template

References πŸ”Ž

Huggingface datasets

  • Law https://huggingface.co/datasets/ymoslem/Law-StackExchange?row=0
  • Psychology https://huggingface.co/datasets/BoltMonkey/psychology-question-answer
  • Business https://huggingface.co/datasets/Rohit-D/synthetic-confidential-information-injected-business-excerpts
  • Philosophy https://huggingface.co/datasets/sayhan/strix-philosophy-qa
  • History https://huggingface.co/datasets/nielsprovos/world-history-1500-qa

Prompt Engineering

https://www.promptingguide.ai/kr/techniques/cot
https://github.com/run-llama/llama_index/tree/main
https://ko.upstage.ai/blog/insight/prompt-engineering-guide-maximizing-the-use-of-llm-with-prompt-design https://python.langchain.com/v0.1/docs/modules/model_io/prompts/few_shot_examples_chat/

Codes/Others

Langchain API , Upstage API
https://smith.langchain.com/hub/
https://console.upstage.ai/api/chat
https://wikidocs.net/book/14314 https://github.com/teddylee777/langchain-kr/tree/main
https://bcho.tistory.com/1419
https://rudaks.tistory.com/entry/langchain-%EB%8B%A4%EC%A4%91-%EB%B2%A1%ED%84%B0%EC%A0%80%EC%9E%A5%EC%86%8C-%EA%B2%80%EC%83%89%EA%B8%B0MultiVector-Retriever https://github.com/langchain-ai/langchain/discussions/13447

About

24-Fall-NLP LLM docs QA project (1st place), Enhancing Large Language Models (LLMs) provided by Upstage (Solar).

Topics

llmllm-qa-documentragraptorupstage

Resources

Readme
Activity

Stars

3 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.