Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Getting Started with AI for VLSI Engineers5
  • Just Enough AI: Models and Context15
  • Prompting13
  • Trust and Verification14
  • Using AI for Engineering Work17
  • Engineering Walkthroughs7
  • Practical Foundations for AI Workflows4
  • Engineering Data5
  • Retrieval-Augmented Generation6
    • The Retrieval Workflow
    • Preparing Engineering Documents
    • Keyword and Semantic Search
    • Embeddings and Vector Storage
    • Grounded Answers and Abstention
    • Specification Assistant Lab
  • Agents and Tool Use18
  • Agent Design8
  • MCP and Skills6
  • Multi-Agent Design6
  • Practical Capstone6
  • Tokens, Cost and Latency12
  • Agentic Workflows for Chip Teams18
  • Interview and Judgment10
  • AI Skills: Full Course Index
  • Working with AI Glossary
  • Working with AI Cheatsheet
Loading lesson

‹Retrieval-Augmented Generation
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Retrieval-Augmented Generation
  4. Keyword and Semantic Search

Retrieval-Augmented Generation · Beginner

Keyword and Semantic Search

Understand exact matches, paraphrases, and the limits of a relevance ranking.

On this page

    Problem: engineers and documents use different words

    An engineer searches for 'wait after reset goes away,' while the specification says 'reset deassertion recovery interval.' The passage may be applicable even though the wording differs. Conversely, a search for a literal error code such as SYNTH_E17 should preserve that exact token; a generally related paragraph about synthesis is not an adequate replacement. Keyword and semantic retrieval address these cases differently. Learn their failure modes before treating either ranking as an answer.

    Keyword retrieval works with words or tokens present in the text. Even a simple set-overlap implementation can be useful for a small collection with controlled terminology. More developed text search can handle phrases, field weights, and ranking. Semantic retrieval uses an embedding model to represent text for similarity comparison, which can help find paraphrases. Similarity does not mean the passage proves the requested fact. Neither approach automatically knows which project, revision, operating mode, or corner governs the question.

    Worked synthetic comparison

    Keyword retrieval uses literal terms and can help with identifiers. Semantic retrieval compares embeddings and may find paraphrases. Both routes end with inspection of passages that satisfy revision and access requirements.
    Two candidate-finding methods, one obligation to inspect applicable evidence; no comparative performance is implied.

    Question

    Candidate passage

    What to check

    reset release

    Reset release requires three rising clock edges...

    Exact shared terms make a useful keyword candidate.

    wait after reset goes away

    Reset deassertion recovery interval...

    A synonym expansion or semantic retriever might help; inspect the actual passage.

    SYNTH_E17

    General synthesis warning handling

    Related subject matter does not establish the exact error-code meaning.

    read latency in 2.0

    Read latency in 1.0

    Reject the wrong revision before ranking eligible evidence.

    For a transparent baseline, lowercase the words, preserve identifier underscores, and count query terms found in each passage. If the required evidence terms are reset and release, both words must appear for the lab's candidate gate; the query words only rank passages that pass. This rule is easy to inspect but brittle: a valid passage using deassertion instead of release will be missed. Adding a reviewed synonym can help, but unrestricted substitutions may collapse distinctions such as asynchronous reset assertion and synchronous reset release.

    A hybrid workflow can retrieve lexical and semantic candidates and combine their ranks, then inspect the passages. Do not simply compare their raw scores: the scales and meanings differ by retrieval method. A reranker is another selection stage that can reorder candidate passages for a question; it still needs evaluation. Keep the version and access filters independent of ranking so a high score cannot make an unauthorized or obsolete passage eligible.

    Exercise: distinguish missing evidence from a missed passage

    Check yourself A reset query produces no keyword hits. What are two different explanations, and how do you investigate them?

    The approved collection may lack the requirement, or the text may express it with different words. Inspect the versioned source and extraction coverage, then try a controlled synonym or a reviewed alternative retrieval method. If the source truly lacks the fact, changing retrieval cannot justify inventing an answer.

    Create a small review set before choosing more machinery: an exact identifier, a paraphrase, a wrong-version trap, an ambiguous question, and an unsupported question. For each one, label the acceptable source chunks and expected abstention behavior. Inspect whether the right evidence appears among the candidates and whether irrelevant candidates are being accepted. A toy keyword score is not a calibrated confidence value, and this course supplies no measurements comparing retrieval approaches.

    Limits and sources

    Keyword matching cannot interpret units, negation, or implied timing relationships. Semantic matching can return plausible neighbors with incompatible conditions. References: SQLite FTS5 for lexical indexing concepts and Sentence Transformers semantic search for query/document retrieval concepts, both consulted 2026-10-18. No external search library or embedding model is needed for the final lab.

    Related topics

    • Up: Retrieval-Augmented Generation

    • Next: Embeddings and vector storage

    Previous

    83 / 173

    Next: Embeddings and Vector Storage

    Up next

    Up nextEmbeddings and Vector Storage

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • The Retrieval Workflow
    • Grounded Answers and Abstention
    • Specification Assistant Lab