cd /news/artificial-intelligence/llms-can-natively-read-and-write-ent… · home › topics › artificial-intelligence › article
[ARTICLE · art-183081] src=gist.github.com ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

LLMs can natively read and write entire vector databases

A developer built dataset-specific retrieval systems for ArguAna, SciFact, and NFCorpus, with scoring code authored by Astra, that use sparse features, corpus statistics, graph operations, and classical matrix factorization without neural inference. The handwritten systems reached nDCG@10 scores of 76.38, 75.61, and 41.18 respectively, beating BM25, DPR, and CDE baselines on all three datasets. The ArguAna system builds an 8,674 × 8,565 sparse reply-score matrix with reciprocal-rank consensus and stable matching, improving from 61.15 to 76.38.

recommendation

Combine reciprocal-rank consensus across lexical views with stable matching on sparse reply scores when queries are corpus passages; the source measured 76.38 versus 61.15 for initial rules on ArguAna.

more in playbook: Retrieval and RAG
by read4 min views4 publishedDec 6, 2026

We built dataset-specific retrieval systems for ArguAna, SciFact, and NFCorpus. Astra authored the scoring code. Encoding and ranking use sparse features, corpus statistics, graph operations, or classical matrix factorization. They run without neural inference.

All numbers are nDCG@10 on a 0–100 scale.

Method ArguAna SciFact NFCorpus
BM25 31.50 66.50 32.50
DPR 17.50 31.80 18.90
CDE 54.90 72.80 36.50
handwritten by GPT-6.2 Astra 76.38 75.61 41.18

The baseline scores come from BEIR and the unsupervised CDE results. The final row combines the best verified dataset-specific runs. Each first-to-final sequence is discussed below. The systems used different inputs, including public corpus text and, for some recipes, external lexical or bibliographic resources.

Vector. One sparse row per document, with 8,565 coordinates for distinct public corpus passages. A coordinate scores how well the document replies to that passage.

V = build_sparse_reply_scores(passages)

for (argument, reply) in V.nonzero_edges:
    agreement = median_across_views(
        reciprocal_rank_in_both_directions(argument, reply, offset=24)
        for view in [word_tfidf, character_tfidf, word_svd_128]
    )
    V[reply, argument] *= exp(1.8 * agreement)

pairs = top_32_acceptable_partners_per_endpoint(V)
acceptance = average(proposer_optimal_matching(pairs),
                     receiver_optimal_matching(pairs))
V *= exp(0.4 * acceptance)
save_csr(V, document_ids, hashes_of_public_passages)

rank(query) = sort_descending(V[:, hash_lookup(query.text)])
              excluding query.document_id

Each view combines forward and reverse reciprocal rank by geometric mean, with zero if either direction is missing. The matching operations adjust existing sparse edges. The 8,674 × 8,565 matrix supports exact lookup because ArguAna queries are public corpus passages. This export provides no column for a new passage.

Results. Initial rules 61.15 → reply matching 75.57 → rank consensus 76.31 → stable matching 76.38. The final run scored 76.30 excluding the five inspected queries. Entity features and sequence alignment failed to improve their matched ArguAna controls.

Vectors. The lexical system uses sparse term features. A separate terminology layer assigns 112 SVD components to each supported stem and drops the leading component for cosine comparisons. The best score includes passage and sentence reranking.

contexts = count_contexts(MEDLINE, fields=[sentence, title, MeSH])
term_vectors = truncated_svd(smoothed_positive_pmi(contexts), rank=112)
term_vectors = normalize(term_vectors[:, 1:])
paper_features = encode(title, abstract, evidence_sentences, term_vectors)
citation_vectors = tfidf(external_citation_passages)

scores = base_claim_scores(claim, paper_features)
q = encode_in_citation_vocabulary(claim)
for paper in corpus:
    best = max_cosine(q, passages_citing(paper), exclude_near_copy_sources)
    margin = max(0, best - cosine(q, paper_in_citation_space) - 0.10)
    scores[paper] += max_base_score * margin

top = top_10(scores)
terms = normalize_greek_and_hyphenated_aliases(claim)
weights = corpus_rarity(terms) * shortlist_rarity(terms, top)
for paper in top:
    scores[paper] += 0.10 * max_current_score *
                     best_weighted_sentence_overlap(paper, terms, weights) /
                     sum_weights_of_terms_seen_in(top)

The citation layer rewards an independently written passage citing the paper when it matches the query better than the paper text does. The sentence layer can reward one specific result in a broadly related abstract. The pseudocode groups the earlier retrieval stages behind base_claim_scores and shows the final two scoring adjustments explicitly.

Results. First run 69.44, round two 72.34, fixed-membership predecessor 74.96, citation-passage margin 75.45, observed-term normalization 75.52, and spelling aliases 75.61. The last run scored 76.14 excluding 50 inspected queries. A later citation residual fell to 75.22 despite positive public results.

Vectors. The first stage uses sparse lexical and biomedical concept features. The final stage uses sparse title-and-abstract TF-IDF vectors for cosine scoring and the underlying term-count vectors for query likelihood and coverage.

base_features = encode_words_and_biomedical_concepts(corpus)
counts = sparse_word_counts(title + abstract, remove_stopwords=True)
vectors = l2_normalize(counts * corpus_idf(counts))

head = composed_top_10(query, base_features)
q_counts = word_counts(query, vocabulary=counts.columns)
q_vector = l2_normalize(q_counts * corpus_idf(counts))
cos = range_scale(vectors[head] @ q_vector)
likelihood = range_scale(dirichlet_query_likelihood(q_counts, counts[head], mu=500))

prior = 61 / [61, ..., 70]
first_three_score = prior[:3] + 0.05 * cos[:3]
last_seven = sort_descending(head[3:], prior[3:] + 0.05 * likelihood[3:])

present = counts[head, query_terms] > 0
weights = q_counts[query_terms] / (1 + count_present(present[3:]))
coverage = range_scale(present[:3] @ weights)
first_three = sort_descending(head[:3], first_three_score + 0.025 * coverage)
return first_three + last_seven

The final adjustment keeps membership fixed. Query-likelihood scoring orders ranks four through ten. Within the first three, a query term contributes less coverage credit when it already appears in several of the remaining seven papers.

Results. First run 34.51, round two 39.01, mixed ranking 41.09, and inverse-tail coverage 41.18. The last run scored 40.43 across 290 previously uninspected queries. A rank-ten replacement that helped both public consumer panels fell to 40.74 on sealed scoring. Perfect ordering of the existing top ten would reach 47.71 under benchmark judgments, so candidate quality alone does not explain the remaining errors.

The pseudocode omits tokenizer details, stable tie handling, and intermediate recipe variants. Scores are full-test results from iterative benchmark development with repeated aggregate feedback. Some queries were inspected under the protocol. The exclusion scores remove those query texts from the metric, while still reflecting the history of aggregate feedback. NFCorpus public evidence grades and observed citations measure different outcomes, and some citation fixtures had too few observed links to evaluate the papers a candidate changed.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @astra 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/llms-can-natively-re…] indexed:0 read:4min 2026-12-06 · —