Skip to content
Discussion options

You must be logged in to vote

You probably don’t want “read 6k docs into one prompt”. You want incremental, dependency-aware ingestion:

  1. Model docs as a DAG or ordered sequence.
  2. Ingest prerequisite docs first.
  3. Store distilled memory items, not just raw chunks.
  4. When ingesting a dependent doc, retrieve the prerequisite memories as context.

For example:

type DocMeta = {
  id: string;
  source: string;
  prerequisites: string[]; // doc IDs that must be ingested first
  hash: string;
};

type MemoryItem = {
  id: string;
  docId: string;
  type: "summary" | "concept" | "fact" | "rule";
  text: string;
  concepts: string[];
  embedding?: number[];
};

Ingestion flow:

async function ingestDoc(doc: DocMeta) {
  await ensurePr…

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by yonikremer
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants