rag

저번 게시글 '처음부터 RAG pipeline 구현하기 - (1)'은 위의 그림에서 [1] 문서 전처리 및 Embedding 생성 단계 에 대해서 다뤄봤다면, 이번 게시글은 Retriever, Augmentation, Generation 과정을 구체적으로 다뤄볼 예정이다.RAG - Search and AnswerRetrieval: 주어진 query와 관련된 resource 가져오기Augmentation: 관련 resource를 prompt에 입력하여, LLM이 해당 정보를 기반으로 텍스트 생성Generation: 검색된 resource를 활용하여 강화(증강)된 응답 생성Similarity searchImport embeddings & embedding modelimport randomimport torc..
RAG(Retrieval Augmented Generation)를 공부하면서 RAG pipeline을 직접 처음부터 구현해보고싶다는 생각을 하게 되었고, 적은 자원으로도 pipeline의 전 과정을 실행해볼 수 있는 오픈 소스를 발견하였다. 5GB+ VRAM을 가진 NVIDIA GPU만 있다면 local 환경에서도 실행할 수 있다. - 링크: https://github.com/mrdbourke/simple-local-rag - Setting: Python 3.11, CUDA 12.1, NVIDIA RTX 4090 + Windows 11  RAG 프로젝트 목표: NutriChat를 build하는 것사람이 Nutrition Textbook 1200 페이지 분량의 PDF 버전에 대해 query 허용LLM이 t..
doammii
'rag' 태그의 글 목록