Skip to content

Commit d0c32fc

Browse files
kfaracikclaude
andcommitted
style: drop the explanatory comments added with the HybridRetriever wrapper
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 0cda426 commit d0c32fc

2 files changed

Lines changed: 0 additions & 14 deletions

File tree

__tests__/hybridRetrieval.test.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -617,13 +617,6 @@ describe('HybridRetriever', () => {
617617
mockKeywordSearch.mockReset();
618618
});
619619

620-
// The cases above already exercise the hybrid logic; this proves the wrapper
621-
// forwards 1:1 — query→prompt, store/embeddings from the constructor, and
622-
// every option spread through. Inputs are chosen so the two options a naive
623-
// spread could silently drop are load-bearing: sourceNamesById resolves doc
624-
// 1's missing name, and attachmentSourceIds keeps doc 2's otherwise-gated
625-
// low-similarity chunk and orders it first. A wrapper that dropped either
626-
// would diverge from the raw call and fail the toEqual.
627620
it('forwards to hybridRetrieve 1:1, including attachmentSourceIds and sourceNamesById', async () => {
628621
const vectorResults = [
629622
{

utils/hybridRetrieval.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -426,13 +426,6 @@ export const hybridRetrieve = async ({
426426
);
427427
};
428428

429-
// Thin app↔library boundary. Binds the store + embeddings so retrieval is a
430-
// single retrieve(query, options) call, making the hybrid testable and portable
431-
// in isolation. It forwards to hybridRetrieve unchanged — no interface, because
432-
// there is one implementation and one caller; extract a Retriever interface only
433-
// if a second retriever ever appears. Deliberately NOT `implements VectorStore`:
434-
// the hybrid is read-only and its ContextChunk output drops id/embedding, so
435-
// coercing to QueryResult would change retrieval results.
436429
export type HybridRetrieveOptions = Omit<
437430
HybridRetrieveParams,
438431
'prompt' | 'vectorStore' | 'embeddings'

0 commit comments

Comments
 (0)