-
Notifications
You must be signed in to change notification settings - Fork 282
[E-3] 12-RAG / 03-RAG-Advanced.ipynb #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
[Title] PydanticOutputParser [Version] second [Language] ENG [Packgage] langchain-openai, langchain-core, pydantic
[Title] 02-RAG-Advanced.ipynb [Version] initial [Language] ENG [Packgage] "bs4", "faiss-cpu", "pypdf", "unstructured", "unstructured[pdf]", "chromadb", "rank_bm25", "langsmith", "langchain", "langchain_text_splitters", "langchain_community", "langchain_core", "langchain_openai", "langchain_experimental"
[Title] 02-RAG-Advanced.ipynb [Version] initial [Language] ENG [Packgage] "bs4", "faiss-cpu", "pypdf", "unstructured", "unstructured[pdf]", "chromadb", "rank_bm25", "langsmith", "langchain", "langchain_text_splitters", "langchain_community", "langchain_core", "langchain_openai", "langchain_experimental"
[Title] 02-RAG-Advanced.ipynb [Version] initial [Language] ENG [Packgage] "bs4", "faiss-cpu", "pypdf", "unstructured", "unstructured[pdf]", "chromadb", "rank_bm25", "langsmith", "langchain", "langchain_text_splitters", "langchain_community", "langchain_core", "langchain_openai", "langchain_experimental"
[Title] 02-RAG-Advanced.ipynb [Version] initial [Language] ENG [Packgage] "bs4", "faiss-cpu", "pypdf", "unstructured", "unstructured[pdf]", "chromadb", "rank_bm25", "langsmith", "langchain", "langchain_text_splitters", "langchain_community", "langchain_core", "langchain_openai", "langchain_experimental"
[Title] 02-RAG-Advanced.ipynb [Version] initial [Language] ENG [Packgage] "bs4", "faiss-cpu", "pypdf", "unstructured", "unstructured[pdf]", "chromadb", "rank_bm25", "langsmith", "langchain", "langchain_text_splitters", "langchain_community", "langchain_core", "langchain_openai", "langchain_experimental"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🖥️ OS: Win/
✅ Checklist
- Template: Tutorials follows the required template.
- Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)
- Image: Image filenames follow guidelines.
- *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
- Code Execution: Code runs without errors.
- Comments: txt 파일 인코딩을 UTF-8로 변경해야 문서로드가 가능했습니다. "loader = TextLoader("data/appendix-keywords_eng.txt", encoding="utf-8")" 이렇게 코드를 수정함이 어떤가 싶습니다. 또한 DirectoryLoader 패키지로는 pdf파일이 로드가 안되는 것같은데 제 컴퓨터 문제일 수도 있어서 확인 한 번 더 부탁드립니다.
abstract
- TextLoader를 사용할 때 encoding="utf-8" 옵션을 추가하여 txt 파일 인코딩 문제 해결.
- DirectoryLoader로 pdf 파일 로드가 안 되는 문제 발생. (본인 컴퓨터 문제일 가능성도 있음)
[Title] 02-RAG-Advanced.ipynb [Version] Second [Language] ENG [Packgage] "bs4", "faiss-cpu", "pypdf", "unstructured", "unstructured[pdf]", "chromadb", "rank_bm25", "langsmith", "langchain", "langchain_text_splitters", "langchain_community", "langchain_core", "langchain_openai", "langchain_experimental" textloader에 encoding 추가, package에 pypdf2추가
일단 리뷰해주신 순형님 너무 감사드립니다!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🖥️ OS: Win
✅ Checklist
- Template: Tutorials follows the required template.
- Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)
- Image: Image filenames follow guidelines.
- *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
- Code Execution: Code runs without errors.
- Comments: 다시 리뷰 해보니 다 잘돌아갑니다. 고생하셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🖥️ OS: Mac
✅ Checklist
- Template: Tutorials follows the required template.
- Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)
- Image: Image filenames follow guidelines.
- 디자인팀 채널에 보면 RAG Process에 7번 Model(LLM)이 수정된 이미지가 있어 해당 이미지로 변경 요청 드립니다.
- Indexing과 Retrieval and Generation에서 사용한 그림은 Langchain 튜토리얼에서 본 적 있는 거 같은데 저작권 문제는 확인하셨을까요?
- *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
- 각 코드 셀에서 import를 하고 있어서 Explore Each Module에 전체 import를 하는 코드 셀이 필요한가 하고 생각이 듭니다. (@teddylee777 )
- Code Execution: Code runs without errors.
- Apple Silicon 맥에서는 libmagic 관련 오류가 발생하는 것으로 보입니다. 설치 방법이 따로 안내가 나가야 할 거 같아 이 부분은 인프라에서도 같이 고민하겠습니다.
- Comments: {Write freely, 한국어 기술 가능}
- Peer Review는 Infra에서 일괄 적용 예정으로 기존 템플릿대로 비워주시면 감사하겠습니다.
- 주요 integrations마다 친절하게 링크가 걸려있어 좋은 거 같습니다.
- 긴 튜토리얼 파일인데 작업한다고 수고 많이 하셨습니다. 이미지 관련 내용만 확인 부탁드립니다.
[Title] 02-RAG-Advanced.ipynb [Version] second [Language] ENG [Packgage] "bs4", "faiss-cpu", "pypdf", "unstructured", "unstructured[pdf]", "chromadb", "rank_bm25", "langsmith", "langchain", "langchain_text_splitters", "langchain_community", "langchain_core", "langchain_openai", "langchain_experimental" 검수팀의 요청사항에 따라 수정하였습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🖥️ OS: mac
✅ Checklist
- Template: Tutorials follows the required template.
- Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)
- Image: Image filenames follow guidelines.
- *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
- Code Execution: Code runs without errors.
- Comments:
- 변수/함수/모듈명에 backtick을 사용하도록 되어 있는데, 파일명/폴더 명에도 적용해도되는지 모르겠습니다. Bold체로 변경해주심이 어떨까 싶습니다.
- libmagic 관련 오류가 발생합니다. 위에서 말씀주신 것 처럼 애플 실리콘 맥북에서 발생하는 문제인 것 같습니다.

- fastembed 파이썬 패키지가 없다고 나옵니다. -> 인프라팀에 추가 요청해주셔야 할 것 같습니다!
- create LLM 파트에서 huggingface model(flan-t5) 로드 시에 hf token이 필요합니다. 해당 내용도 함께 기입되면 좋을 것 같습니다.
- 인프라팀에서 수정해주실 것 같지만 파일 명이 03번이 되어야 할 것 같습니다..!
나머지 부분은 잘 동작합니다! 내용이 정말 많고 잘 정리되어 있는데 정말 고생하셨을 것 같습니다. ㅠㅠ 수고하셨습니다👍
[Title] 03-RAG-Advanced.ipynb [Version] Third [Language] ENG [Packgage] "bs4", "faiss-cpu", "pypdf", "unstructured", "unstructured[pdf]", "chromadb", "rank_bm25", "langsmith", "langchain", "langchain_text_splitters", "langchain_community", "langchain_core", "langchain_openai", "langchain_experimental" 1. 파일 폴더명 backtick을 bold체로 바꾸었습니다. 3. 아고.. 인프라팀에 요청했는데, package에 적질 않았네요.. 수정하겠습니다. 4. You need a Hugging Face token to access LLMs on HuggingFace. 로 추가하였습니다. 5. 파일명 수정하였습니다.
리뷰해주신 선형님 감사드립니다!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다! 고생 많으셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🖥️ OS: Mac
✅ Checklist
- Template: Tutorials follows the required template.
- Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)
- Image: Image filenames follow guidelines.
- Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
from langchain_community.embeddings import HuggingFaceBgeEmbeddings
이 Deprecated되었습니다. 따라서from langchain_huggingface import HuggingFaceEmbeddings
으로 변경해야 할 거 같습니다. 또한 HuggingFaceBgeEmbeddings 클래스에서 사용되던 model_name의 기본 값이 더 이상 지원되지 않아 모델 이름을 명시해야 할 거 같습니다.BaseRetriever.get_relevant_documents
또한 Deprecated되어invoke()
로 변경이 필요해 보입니다.HuggingFaceHub
또한 Deprecated되어langchain_huggingface.HuggingFaceEndpoint
로 변경이 필요해 보입니다.- Code Execution: Code runs without errors.
- Comments: {Write freely, 한국어 기술 가능}
WebBaseLoader
로더 사용 시USER_AGENT
설정이 되어 있지 않아 경고가 출력되는 것으로 보이는데 set_env 단계에서"USER_AGENT":"Mozilla/5.0 (compatible; langchain-opentutorial/1.0; +https://github.com/langChain-OpenTutorial/)"
이런 식의 추가가 있으면 좋을 거 같습니다.USER_AGENT environment variable not set, consider setting it to identify your requests.
1. WebBaseloader 오류를 위해 .env에 user_agent추가. If a warning is displayed due to the `USER_AGENT` not being set when using the WebBaseLoader, please add `USER_AGENT = myagent` to the `.env` file. 문구를 추가하였습니다. 2. huggingface embedding 수정(디폴트모델((Default model: sentence-transformers/all-mpnet-base-v2)) 추가, from langchain_huggingface import HuggingFaceEmbeddings로 변경, ) 3. from langchain_huggingface import huggingfaceendpoint모듈로 변경(이에맞게 모델도 "microsoft/Phi-3-mini-4k-instruct"로 변경) 4. get_relevance로 있던 요소 하나를 invoke로 수정.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다시 돌려봐도 문제 없이 잘 실행되었습니다.
수고하셨습니다.
{PR Message - Write freely, remove this bracket if unnecessary}
[Title] 02-RAG-Advanced.ipynb
[Version] initial
[Language] ENG
[Packgage] "bs4", "faiss-cpu", "pypdf", "unstructured", "unstructured[pdf]", "chromadb", "rank_bm25", "langsmith", "langchain", "langchain_text_splitters", "langchain_community", "langchain_core", "langchain_openai", "langchain_experimental"
Author Checklist
[O] PR Title Format: I have confirmed that the PR title follows the correct format. (e.g., [N-2] 07-Text Splitter / 07-RecursiveCharacterTextSplitter)
[O] Committed Files: I have ensured that no unnecessary files (e.g., .bin, .gitignore, poetry.lock, pyproject.toml) are included. These files are not allowed.
[] (Optional) Related Issue: If this PR is linked to an issue, I have referenced the issue number in the PR message. (e.g., Fixes Update 01-PromptTemplate.ipynb #123)
❌ Do not include unnecessary files (e.g., .bin, .gitignore, poetry.lock, pyproject.toml) or other people's code. If included, close the PR and create a new PR.
Review Template (Intial PR)
If no one reviews your PR within a few days, please @-mention one of teddylee777, musangk, BAEM1N