Skip to content

[FAQ Bot] NEW: Why can np.allclose(scores, scores_loop) return False when comparing the#277

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
faq-bot/issue-276
Open

[FAQ Bot] NEW: Why can np.allclose(scores, scores_loop) return False when comparing the#277
github-actions[bot] wants to merge 1 commit into
mainfrom
faq-bot/issue-276

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

✨ FAQ NEW

Course: llm-zoomcamp
Section: module-2-vector-search (This topic fits under Module 2: Vector Search, addressing numerical precision and cross-implementation comparisons that students might encounter when evaluating vector search results.)
Related Issue: #276

Question

Why can np.allclose(scores, scores_loop) return False when comparing the matrix multiplication version of vector search with a Python for loop? Aren't they doing the same math?

Decision Rationale

The proposed question targets a practical floating-point precision nuance in Module 2 vector search that is not covered by existing FAQs. It explains why two mathematically equivalent approaches can yield slightly different results and how to robustly compare them, warranting a new FAQ entry.

Placement Details

  • Section ID: module-2-vector-search
  • Sort Order: 2
  • Filename Slug: np-allclose-vector-search-differences-lesson4

🤖 Generated by FAQ Bot

Closes #276

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.

FAQ Proposal: Why can np.allclose(scores, scores_loop) return False in Module 2, Lesson 4?

0 participants