aifree.dev

Vì sao reranker sửa được kết quả đầu của RAG?

Reranking: cross-encoder xếp lại các chunk đứng đầu của bộ tìm kiếm · Thực hành · 5 phút · rag, embeddings · học sau Chunking: kích thước chunk, phần chồng lấn và chỗ cắt trong RAG

Reranker là mô hình thứ hai đọc câu hỏi cùng với từng chunk tìm được và chấm xem chunk đó trả lời câu hỏi tốt đến đâu. Nó xếp lại vài kết quả đầu của bộ tìm kiếm, nhưng không tìm được chunk mà bộ tìm kiếm đã bỏ sót.

Trước khi bắt đầu: bạn giải thích được chuyện này cho bạn bè không?

1 = hoàn toàn không · 5 = dễ dàng

  1. 1 Đoán trước

    Trên trang bảng giá của bài chunking, bạn hỏi: “What is the daily limit if I don’t pay?” (đáp án: 1,000). Top 3 của bộ tìm kiếm ở dưới, tốt nhất trước. Reranker đọc lại cả ba. Nó đặt mẩu nào lên đầu?
  2. 2 Xem

    Search, then rerank

    1 / 3
    ask:

    “What is the daily limit if I don’t pay?” (answer: 1,000)

    1 · search: top 3 by cosine (question and chunk embedded apart)

    1. A✗ Every account starts on the Free plan. The Pro plan costs $20 a month, billed in advance. It allows 50,0000.40
    2. C✓ address and your API key appears at once. It allows 1,000 requests per day. Requests over the daily limit return0.39
    3. B✗ requests per day, and support answers within four hours. The Free plan needs no card: sign up with an email0.37

    2 · reranker: reads the question and each chunk together

    1. C✓ address and your API key appears at once. It allows 1,000 requests per day. Requests over the daily limit return-6.4
    2. B✗ requests per day, and support answers within four hours. The Free plan needs no card: sign up with an email-10.2
    3. A✗ Every account starts on the Free plan. The Pro plan costs $20 a month, billed in advance. It allows 50,000-10.8

    Search alone returns A ✗ · after the reranker: C ✓, which holds the answer

    search: all-MiniLM-L6-v2, cosine · reranker: ms-marco-MiniLM-L6-v2, relevance score · measured 2026-10-23

    The search ranks the Pro chunk first. The reranker reads each of the top 3 with the question and lifts C, the one with 1,000.

    Bộ tìm kiếm chọn danh sách ngắn theo độ nghe giống; reranker đọc từng mẩu cùng câu hỏi và xếp lại danh sách đó, nhưng chỉ danh sách đó.

  3. Bộ tìm kiếm so hai embedding làm riêng rẽ: của chunk, làm một lần lúc lập chỉ mục, và của câu hỏi. Đủ nhanh cho hàng triệu chunk. Reranker (mô hình chấm điểm từng cặp câu hỏi–chunk) đọc cả hai đoạn trong một lượt, nên mỗi chữ của câu hỏi gặp mỗi chữ của chunk. Chính xác hơn, nhưng chạy một lần cho mỗi cặp, nên nó chỉ xem vài mẩu đầu.

  4. 4 Bạn là model

    Bạn là reranker. Với bốn câu hỏi, đọc top 3 chunk của bộ tìm kiếm và chọn chunk mà ms-marco-MiniLM-L6-v2 chấm điểm cao nhất.

    you are the reranker · read the question and the search’s top 3, pick the chunk ms-marco-MiniLM-L6-v2 puts first

    “What is the daily limit if I don’t pay?”

    search: all-MiniLM-L6-v2, cosine · reranker: ms-marco-MiniLM-L6-v2, relevance score · measured 2026-10-23

    You are the reranker. Which chunk answers the question?
  5. 5 Kiểm tra

    Trong hình, “Can I carry over unused requests…?” Đáp án, D, đứng thứ ba trong bộ tìm kiếm. Top k nhỏ nhất để reranker tìm ra nó là bao nhiêu?
  6. Vài thói quen giúp ích. Lấy rộng, rerank, giữ ít: lấy top 20 đến 100 chunk, rerank, dán 3 đến 5 chunk tốt nhất. Reranker không khôi phục được ngữ cảnh mà chỗ cắt đã làm mất, nên sửa chunking trước. Nó cũng có thể sai: ở đây nó đẩy chunk có 50,000 của gói Pro xuống dưới hai chunk không có. Hãy thử bằng câu hỏi thật.

  7. 7 Nói lại bằng lời bạn

  8. 8 Nhiệm vụ · 5 phút

    Chép key miễn phí trên trang của Jina (không cần thẻ) và POST tới https://api.jina.ai/v1/rerank với model "jina-reranker-v3.5", query “How many requests per day does the free plan allow?” và hai chunk B, C làm documents (B: “requests per day, and support answers within four hours. The Free plan needs no card: sign up with an email”; C: “address and your API key appears at once. It allows 1,000 requests per day. Requests over the daily limit return”). Reranker lớn hơn có vẫn chọn B không?

Ba câu nhanh

Rút ngẫu nhiên từ bộ câu hỏi của bài; lần sau sẽ khác.

Xong chưa?

Còn bây giờ: bạn giải thích được cho bạn bè chưa?

1 = hoàn toàn không · 5 = dễ dàng

Trả lời ba câu nhanh trước đã.

Nhận email khi có bài mới

Bài mới nằm trong bản tin hằng tuần, chỉ gửi vào tuần có bài. Bạn xác nhận qua email trước; hủy đăng ký chỉ với một lần bấm.

Nguồn

  • Reranker scores: raw relevance logits of cross-encoder/ms-marco-MiniLM-L6-v2 (https://huggingface.co/cross-encoder/ms-marco-MiniLM-L6-v2: BERT, 6 layers, 384 wide, trained on MS MARCO; default activation Identity) on 2026-10-23 by scripts/explain-data/reranking.ts, a plain TS forward pass (pooler + classifier on the shared BERT encoder of scripts/explain-data/semantic-search.ts) that reproduces the model card example 8.607138, -4.320078
  • Search scores: cosine similarities with sentence-transformers/all-MiniLM-L6-v2, same script and date; the free-plan scores equal the chunking lesson’s (0.753, 0.637, 0.572)
  • The page and its five 20-word chunks are the chunking lesson’s (app/components/explain/lessons/chunking-data.ts); the questions are in app/components/explain/lessons/reranking-data.ts
  • Scores used (search cosine → reranker logit, chunks A–E): “don’t pay” A 0.404 → −10.76, B 0.373 → −10.22, C 0.387 → −6.43; carry over C 0.497 → −4.22, B 0.452 → −5.07, D 0.397 → −0.59; error C 0.321 → −9.46, D 0.293 → −7.09; free plan B 0.753 → 7.03, C 0.637 → 4.55, A 0.572 → −1.93; Pro plan A 0.613 → −0.56, C 0.596 → 4.14, B 0.594 → 3.77; cut by paragraph (the chunking lesson’s fix), free plan: the Free paragraph is first for both, cosine 0.780 and reranker 9.46 (next: Pro paragraph 4.33)
  • https://sbert.net/examples/cross_encoder/applications/README.html (checked 2026-10-23): “A Cross-Encoder does not produce a sentence embedding”; retrieve e.g. the top 100 with a bi-encoder, then re-rank them with a cross-encoder
  • https://jina.ai/reranker/ (checked 2026-10-23): endpoint https://api.jina.ai/v1/rerank (model, query, documents, top_n); recommended text model jina-reranker-v3.5; “New users get an auto-generated API key with free tokens usable across any of our models”; aifree.dev catalog jina-ai-free-api-tokens (verified 2026-10-12): 10M tokens per new API key, no card

Đăng Oct 23, 2026 · cập nhật Oct 23, 2026

Never miss new offers and news

New tools, credits, and AI news are added regularly. Pick how you want to hear about them.

Telegram channel
Join @aifree_dev and get new free AI offers and news right in your Telegram feed.
Browser notifications
Turn on push notifications and get an alert on this device whenever something new is posted. No account needed.
Email newsletter
A weekly digest of new, changed and expiring free AI offers. Double opt-in, one-click unsubscribe. See the latest issue.

Unsubscribe anytime. Privacy

Frequently asked questions

What is aifree.dev?

aifree.dev helps everyone access AI through a curated directory of free AI tools, API credits, free tiers, and startup programs for coding, image, voice, video, and students - verified regularly.

How are offers presented?

Each offer includes its access details, free models when available, and expiration information when provided. Limited-time deals stay visible so they are easy to compare.

Do education and startup programs need verification?

Yes. Providers usually ask students to verify their status with a school email, student ID, or a program like the GitHub Student Pack, and ask startups to verify company details such as age, funding, or website. Check each offer’s claim page for the exact requirements.

What kinds of free AI offers are listed?

Free tiers and free trials from AI providers, free API credits, startup and student programs, and free tools for coding, image generation, voice, and video.

How can I suggest a tool or report a broken link?

Use the submit form: paste the offer page URL and a short note. A person checks every submission before anything is listed. Broken links and changed terms go through the same form.

+

Know a good one?

Tell us about an AI tool worth knowing. Found a broken link? We want to hear that too.

Submit an offer