bench: OpenKnowledge embeddings provider head-to-head (LodeDB vs OpenAI default) - #78
Open
Davidobot wants to merge 1 commit into
Open
bench: OpenKnowledge embeddings provider head-to-head (LodeDB vs OpenAI default)#78Davidobot wants to merge 1 commit into
Davidobot wants to merge 1 commit into
Conversation
…AI default) benchmarks/openknowledge_embeddings answers what an OpenKnowledge user trades by pointing search.semantic.baseUrl at lodedb serve instead of the default OpenAI text-embedding-3-small provider. Quality: OpenKnowledge's own semantic-eval harness run unmodified via its env knobs; LodeDB minilm (and bge) pass their pre-registered FR2 gate (held-out MRR 0.753 vs 0.797, recall@5 1.000 vs 0.923, n=13). Performance (Modal, cpu=8, kubernetes/website content/en pinned at 71d23f81, 2,441 docs / 4,485 chunks): faithful ports of their chunker (UTF-16 parity-tested) and embedder batching/retry/timeout semantics, same pooled HTTP client both sides. OpenAI bulk-indexes 1.4-2.9x faster (median 1.8x); LodeDB query p50 is 4.5 ms vs 173.3 ms (~38x) with max 7.7 ms vs 2,804.8 ms, at zero cost and zero content egress (OpenAI path: $0.116 and 159.5 MB per full index). Bulk throughput varied ~2x across Modal hosts; medians and ranges published, raw metrics-only JSONs committed for all five runs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
benchmarks/openknowledge_embeddings/: what does an OpenKnowledge (inkeep/open-knowledge) user trade by pointingsearch.semantic.baseUrlatlodedb serveinstead of the default OpenAItext-embedding-3-small?semantic-eval.tsharness run unmodified via its env knobs; LodeDBminilm(andbge) pass their pre-registered FR2 gate (held-out MRR 0.753 vs 0.797, recall@5 1.000 vs 0.923, n=13; bge passes but scores below minilm because its query prefix cannot be expressed over the OpenAI wire, which is why minilm is the documented recommendation)content/enpinned at71d23f81(2,441 docs / 4,485 chunks), chunked and batched with faithful ports of their chunker (UTF-16 parity-tested against their own test cases) and embedder semantics (96/96k sequential batches, their retry/timeout policy, pooled connections, same client both sides)benchmarks/README.mdindex rowTesting
.venv/bin/python -m pytest benchmarks/openknowledge_embeddings/ -q: 11 passed (chunker UTF-16 parity vs their chunking.test.ts cases, batcher, surrogate sanitization); bench tests are folder-local like the other benchmark suites, exact invocation documented in the READMEruff checkcleanresults/