Skip to content

docs: clarify BM25 is keyword retrieval, not semantic search in unit 2.1 - #697

Open
UdayKiranJadi wants to merge 1 commit into
huggingface:mainfrom
UdayKiranJadi:fix/bm25-semantic-search-terminology-319
Open

docs: clarify BM25 is keyword retrieval, not semantic search in unit 2.1#697
UdayKiranJadi wants to merge 1 commit into
huggingface:mainfrom
UdayKiranJadi:fix/bm25-semantic-search-terminology-319

Conversation

@UdayKiranJadi

Copy link
Copy Markdown

What this fixes

Closes #319

The PartyPlanningRetrieverTool example uses BM25Retriever, which is a
lexical/keyword-based retrieval algorithm — not semantic search. The code
and surrounding prose incorrectly labeled it as "semantic search", which
confused learners (as noted in the issue thread).

Changes

  • Replaced "vector database... semantic search" description with accurate
    BM25/keyword-based explanation, including a note on how it differs from
    vector-based semantic search
  • Fixed "combines predefined knowledge with semantic search" →
    "keyword-based retrieval and LLM reasoning"
  • Fixed tool description string: "Uses semantic search" →
    "Uses keyword-based retrieval (BM25)"

@UdayKiranJadi

Copy link
Copy Markdown
Author

Hi! I've submitted a PR to fix this — #697 . Please take a look when you get a chance!"

@yuka-with-data yuka-with-data left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the PR went with Option 1 (from issue #319), and nice work on the update.

I was also curious how the maintainers would prefer this to evolve, since the surrounding section already starts leaning into vector databases. Option 2 could also fit that flow naturally, but I am fine with either direction depending on the intended framing.

Either way, this is a solid improvement. Thanks for working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UPDATE] The Use of BM25 for Semantic Search Example in Unit 2.1 retrieval_agents.mdx

2 participants