digest: cache chunk embeddings; long documents answer from BM25 while embedding in the background
Cached chunk embeddings change what a long document answers with: BM25 first, embedding uncached chunks (or the whole document) in the background so the next question on the same doc scores hybrid. selectText now returns its mode and the number of chunks that had a vector at answer-build time; the digest cache stores only hybrid answers, never a provisional bm25 one. The background worker batches through a Dixie gate and WaitBackground polls for true idle. Co-Authored-By: ornith-1.5-35b-a3b <ornith-1.5-35b-a3b@llama.cpp.invalid>
This commit is contained in:
@@ -374,7 +374,7 @@ func TestPinChunk0Infobox(t *testing.T) {
|
||||
if EstTokens(cleaned) <= SmallDoc {
|
||||
t.Fatalf("fixture too small: %d", EstTokens(cleaned))
|
||||
}
|
||||
body, nUsed, nTotal, err := e.selectText(context.Background(), cleaned, "when was the initial release?")
|
||||
body, nUsed, nTotal, _, _, err := e.selectText(context.Background(), cleaned, "when was the initial release?", "", dcache.ClassFleet)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user