내일처럼
학습 정리

[Paper-review]RAGAS: Automated Evaluation of Retrieval Augmented Generation

https://arxiv.org/abs/2309.15217 RAGAS: Automated Evaluation of Retrieval Augmented GenerationWe introduce RAGAs (Retrieval Augmented Generation Assessment), a framework for reference-free evaluation of Retrieval Augmented Generation (RAG) pipelines. RAG systems are composed of a retrieval and an LLM based generation module, and provide LLMs with karxiv.orghttps://github.com/explodinggradients/r..

Tips

[Azure] Azure openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}

Run failed: OpenAI API hits NotFoundError: Error code: 404 - {'error': {'code': 'DeploymentNotFound', 'message': 'The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.'}} [Error reference: ]에러Azure OpenAI 리소스 생성한 다음 VScode promptflow 메뉴 - connections에서 Azure OpenAI 연결 추가하기(+ 버튼) 누르고 API 키, 엔드 포인트 입력하였지만 에..

학습 정리

langchain quickstart 따라하기

환경 세팅conda로 파이썬 환경을 만들어 줍니다.conda create -n ragex python=3.9conda activate ragexdotenv를 사용해서 api키를 관리할 것이므로. env 파일도 만들어주고 api key 적어줍니다.echo "OPENAI_API_KEY='{your_api_key}'" >> .env다운로드pip install python-dotenv langchain langchain-openaiLLM 부르기from dotenv import load_dotenvfrom langchain_openai import ChatOpenAIload_dotenv()llm = ChatOpenAI()llm에게 무언가 물어봅시다. “langsmith가 어떻게 쓰이는 거야?”llm.invoke(..

Tips

Python dotenv 사용법

LLM을 사용하려면 API 키를 입력해야 하는데, 이 API 키를 소스 코드 파일에 직접 넣게 되면 보안상 위험이 있습니다. 이러한 상황에서 .env 파일을 사용하여 환경 변수로 API 키를 관리하는 dotenv를 사용해 보겠습니다. 이 방법을 사용하면 API 키를 안전하게 보호할 수 있습니다.다운로드pip install python-dotenv.env 파일 생성OPENAI_API_KEY="this_is_my_api_key"사용 예제from dotenv import load_dotenvimport osfrom langchain_openai import ChatOpenAIload_dotenv()llm = ChatOpenAI(api_key=os.environ["OPENAI_API_KEY"])

학습 정리

[Paper-review]Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks

주로 RAG로 불리는 모델을 제시한 논문입니다. https://arxiv.org/abs/2005.11401 Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks Large pre-trained language models have been shown to store factual knowledge in their parameters, and achieve state-of-the-art results when fine-tuned on downstream NLP tasks. However, their ability to access and precisely manipulate knowledge is still lim arxiv.org Abstra..

흐르는 물에 씻어주세요
내일처럼