[19] [Bug] [Retrieval] File document IDs depend on how the path is spelled; uppercase extensions are skipped
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with the source assignment in retrieval/loaders/text_loader.py (around line 55), then csv_loader.py, json_loader.py, pdf_loader.py and pdf_ocr_loader.py, and the rglob calls in directory mode. The HuggingFace source strings are in huggingface_loader.py near lines 138 and 180. Done means the same file gives the same id through different path spellings, and SCAN.PDF-style files are picked up. Decide the base for relative paths first, since that changes existing ids.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
- IDs follow the path spelling. The file loaders use
str(path)as the source (retrieval/loaders/text_loader.py:55,csv_loader.py:86,json_loader.py:185,pdf_loader.py:83), and the source becomes the document id.kb/a.txt,/abs/kb/a.txtandkb/../kb/a.txtgive three different ids for the same file. Running from cron with a different working directory, or in a container with a different mount path, re-ingests the whole corpus as new documents, and the old copies are never removed. - HuggingFace sources are incomplete. They are
"{dataset_name}/{split}#..."(retrieval/loaders/huggingface_loader.py:138,:180). A config name or revision passed throughdataset_kwargsisn't included, so two configs of the same dataset collide. - Extensions match case-sensitively. Directory mode uses
rglob("*.pdf"),"*.csv"and similar (retrieval/loaders/pdf_loader.py:155,pdf_ocr_loader.py:231,csv_loader.py:156,json_loader.py:263), soSCAN.PDFandDATA.CSVare silently skipped.
Proposed fix
- Use the path relative to the directory passed in, or a resolved absolute path, as the source. Relative is more portable.
- Include the config and revision in HuggingFace sources.
- Match extensions case-insensitively.
Acceptance criteria
- The same file loaded through different path spellings gets the same id.
- Uppercase extensions are picked up in directory mode.
- Ngôn ngữ chính
- Python
- Star
- 230
- Fork
- 57
- Merge trung bình
- 2 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 36
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của RailtownAI/railtracks
-
[08] [Bug] [Retrieval] `OpenAIEmbedding`/`AzureEmbedding` have no default batch size, so the docs examples crashCó thể đã có người làm @Shivani120703 đã nhận 5 ngày trước. Đang mởarea:retrieval
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
RailtownAI/railtracks#1653 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:retrieval
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
RailtownAI/railtracks#1652 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:retrieval
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
RailtownAI/railtracks#1651 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
URL attachments with a non-image extension (.mp3, .mp4, .docx) are silently sent as imagesCó thể đã có người làm @CoronRing đã nhận 5 ngày trước. Đang mởarea:llm bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
RailtownAI/railtracks#1645 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
RailtownAI/railtracks#1633 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của RailtownAI/railtracks
Issue tương tự
-
bug Size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
oposs/repo-infra#93 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Graphify-Labs/graphify#4546 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
521xueweihan/HelloGitHub#4025 ·