SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.03731 · 2026

CUBO: Self-Contained Retrieval-Augmented Generation on Consumer Laptops 10 GB Corpora, 16 GB RAM, Single-Device Deployment

Paolo Astrino

arXiv · PDF · Open in the Atlas

Code that ran

2 of 2 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2602.03731.json · badge: /api/ran/2602.03731.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
PaoloAstrino/CUBO canonical (classifier label)
classifier basis: census
2 ran · 0 no recorded run
FunctionStatusWhere it lives
candidate_to_dict Ran
ran; our contract draft was wrong, not the code
PaoloAstrino/CUBO/cubo/retrieval/models.py
code served (permissive licence) · get_code("3c74ad9399f6b621")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned RetrievalCandidate. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from typing import Any, Dict, Union

class RetrievalCandidate:
    """A candidate document chunk from retrieval."""
    def __init__(
        self,
        id: str = None,
        document: str = "",
        metadata: Dict[str, Any] = None,
        similarity: float = 0.0,
        base_similarity: float = 0.0,
        bm25_score: float = 0.0,
        bm25_normalized: float = 0.0,
        tier_boost: float = 0.0,
        canonical_chunk_id: str = None,
    ):
        self.id = id
        self.document = document
        self.metadata = metadata if metadata is not None else {}
        self.similarity = similarity
        self.base_similarity = base_similarity
        self.bm25_score = bm25_score
        self.bm25_normalized = bm25_normalized
        self.tier_boost = tier_boost
        self.canonical_chunk_id = canonical_chunk_id

    def to_dict(self) -> Dict[str, Any]:
        """Convert to dictionary for backwards compatibility."""
        result = {
            'id': self.id,
            'document': self.document,
            'metadata': self.metadata,
            'similarity': self.similarity
        }
        if self.base_similarity:
            result['base_similarity'] = self.base_similarity
        if self.bm25_normalized:
            result['bm25_normalized'] = self.bm25_normalized
        if self.tier_boost:
            result['tier_boost'] = self.tier_boost
        if self.canonical_chunk_id:
            result['canonical_chunk_id'] = self.canonical_chunk_id
        return result

    @classmethod
    def from_dict(cls, data: Dict[str, Any]) -> 'RetrievalCandidate':
        """Create from dictionary."""
        return cls(
            id=data.get('id'),
            document=data.get('document', data.get('content', '')),
            metadata=data.get('metadata', {}),
            similarity=data.get('similarity', data.get('score', 0.0)),
            base_similarity=data.get('base_similarity', 0.0),
            bm25_score=data.get('bm25_score', 0.0),
            bm25_normalized=data.get('bm25_normalized', 0.0),
            tier_boost=data.get('tier_boost', 0.0),
            canonical_chunk_id=data.get('canonical_chunk_id')
        )


def candidate_to_dict(candidate: Union[RetrievalCandidate, Dict[str, Any]]) -> Dict[str, Any]:
    """Convert a candidate to dictionary format."""
    if isinstance(candidate, RetrievalCandidate):
        return candidate.to_dict()
    return candidate


# Create test candidates
retrieval_candidate = RetrievalCandidate(
    id="chunk_001",
    document="This is a sample document chunk with some content.",
    metadata={"source": "document_1", "page": 1},
    similarity=0.95,
    base_similarity=0.92,
    bm25_score=15.5,
    bm25_normalized=0.87,
    tier_boost=0.05,
    canonical_chunk_id="canonical_001"
)

dict_candidate = {
    "id": "chunk_002",
    "document": "Another sample document chunk.",
    "metadata": {"source": "document_2", "page": 2},
    "similarity": 0.88,
    "score": 0.85
}

ARGS = {
    "candidate": retrieval_candidate
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type RetrievalCandidate — a RetrievalCandidate output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RetrievalCandidate output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
dict_to_candidate Ran
ran; our contract draft was wrong, not the code
PaoloAstrino/CUBO/cubo/retrieval/models.py
code served (permissive licence) · get_code("280f3acf169b8d06")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned RetrievalCandidate. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from typing import Any, Dict

# Create a sample dictionary with various fields that dict_to_candidate might receive
sample_data = {
    'id': 'chunk_001',
    'document': 'This is a sample document chunk with relevant information.',
    'content': 'Alternative content field',
    'metadata': {
        'source': 'document_a.pdf',
        'page': 5,
        'section': 'introduction'
    },
    'similarity': 0.85,
    'score': 0.80,
    'base_similarity': 0.82,
    'bm25_score': 145.3,
    'bm25_normalized': 0.75,
    'tier_boost': 0.05,
    'canonical_chunk_id': 'canonical_001'
}

ARGS = {
    'data': sample_data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type RetrievalCandidate — a RetrievalCandidate output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RetrievalCandidate output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 2 samples lifted from this paper's linked repositories, 2 carry a function identity and 0 do not. Of the 2 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Organizations handling sensitive documents face a tension: cloud-based AI risks GDPR violations, while local systems typically require 18-32 GB RAM. This paper presents CUBO, a systems-oriented RAG platform for consumer laptops with 16 GB shared memory. CUBO's novelty lies in engineering integration of streaming ingestion (O(1) buffer overhead), tiered hybrid retrieval, and hardwareaware orchestration that enables competitive Recall@10 (0.48-0.97 across BEIR domains) within a hard 15.5 GB RAM ceiling. The 37,000-line codebase achieves retrieval latencies of 185 ms (p50) on C1,300 laptops while maintaining data minimization through local-only processing aligned with GDPR Art. 5(1)(c). Evaluation on BEIR benchmarks validates practical deployability for small-tomedium professional archives. The codebase is publicly available at https://github.com/ PaoloAstrino/CUBO.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2602.03731")
get_code_for_paper("2602.03731")
have("2602.03731")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2602.03731.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2602.03731.svg)](https://syntology.ai/paper/2602.03731)

Connect an agent — have() is free.