एक अतिसूक्ष्म अभियांत्रिकी प्रणाली को असफल करने का सबसे आसान तरीका यह है कि उसे बहुत अधिक याद रखें
अधिकतर "संtext handling" दृष्टिकोण दो गलतियों में से एक के रूप में समाप्त हो जाता है
दोनों दृष्टिकोण महंगे हैं
एक बेहतर नमूना है, जो जैविक प्रणालियां वास्तव में चिन्तन को कैसे मापन करती हैं, प्रतिबिंबित करता है
मैं इसे कहता हूँ प्रतिबंधित अस्पष्ट संदर्भ खींचना सीएफसीडी
प्रतिबंधित अस्पष्ट संदर्भ खींचना एक पैटर्न है जहां संभाव्यतावादी मॉडल जो प्रमुख है प्रस्तावित करता है, लेकिन केवल निर्णायक नियमों को भविष्य के तर्क या पीढ़ी पर प्रभाव डालने के लिए उस प्रमुखता को आगे ले जाने की अनुमति दी जाती है
या अधिक स्पष्ट रूप से
मॉडल ध्यान दे सकते हैं
यह वही दार्शनिक विभाजन है जैसे अवरोधित अस्पष्टता और प्रतिबंधित अस्पष्ट मोएम - बस के साथ लागू किया गया काल अक्ष के बजाय निर्णय अक्ष.
LLMs नहीं "remember". वे पैटर्न -match over tokens
जब हम संदर्भ के रूप में व्यवहार करते हैं "just more text
लंबा संदर्भ विंडो यह नहीं हल करता है
असली सवाल नहीं है कितना को रखने के लिए संदर्भ
जीने का क्या हकदार है
सीएफसीडी एक कठोर पृथक्करण को लागू करता है
भूमिका | अस्पष्ट होने की अनुमति देता है |------|---------------------|--------------------------------------| | नम्रता का पता लगाना संदर्भ संवर्धन उत्पादन | हाँ | एन्कोर भंडारण
संभाव्यता सुझाव देनानिर्धारिता decides what gets dragged forward
निर्णायक अर्थ एक ही इनपुट + एक ही नीतिआप अभी भी संभाव्यात्मक अंक का उपयोग कर सकते हैं
सीएफसीडी यह है कि आप संदर्भ का लाभ बिना संदर्भ की कीमत चुकाने कैसे प्राप्त कर सकते हैं
यह असफल है क्योंकि:
प्रमुख अंतर्दृष्टि सुस्पष्टता पता लगाने के लिए LLM की आवश्यकता नहीं हैआप निर्धारणात्मक ML का उपयोग कर सकते हैं
डॉक-सममैरिजर इस implements this:
LLM कभी भी पूरी दस्तावेज़ नहीं देखता
// From DocSummarizer: SegmentExtractor.cs
public class SegmentExtractor
{
private readonly OnnxEmbeddingService _embeddingService; // ML, not LLM
public async Task<ExtractionResult> ExtractAsync(string docId, string markdown)
{
// 1. Parse document into typed segments
var segments = ParseToSegments(docId, markdown);
// 2. For large docs: semantic pre-filtering with multi-anchor approach
// - Guaranteed coverage: first/last sentences per section, constraints
// - BM25 candidate generation with pseudo-query from TF-IDF terms
// - Topic anchors via k-means clustering on sample embeddings
if (segments.Count > _config.MaxSegmentsToEmbed)
{
(segmentsToEmbed, centroid) = await SemanticPreFilterAsync(segments, targetCount);
}
else
{
await GenerateEmbeddingsAsync(segments);
centroid = CalculateCentroid(segments);
}
// 3. Score by salience using MMR (deterministic)
// Salience = lambda * sim(segment, centroid) * position_weight * content_weight
// - (1 - lambda) * max_sim(segment, higher_ranked_segments)
ComputeSalienceScores(segments, centroid, contentType);
// 4. Return top-K as anchors for synthesis
var topBySalience = segments
.OrderByDescending(s => s.SalienceScore)
.Take(Math.Max(_config.FallbackBucketSize, targetCount))
.ToList();
return new ExtractionResult
{
AllSegments = segments,
TopBySalience = topBySalience,
Centroid = centroid,
ContentType = contentType
};
}
/// <summary>
/// Greedy MMR selection: balances relevance with diversity
/// </summary>
private void ComputeSalienceScores(List<Segment> segments, float[] centroid, ContentType contentType)
{
var candidates = new HashSet<Segment>(segments.Where(s => s.Embedding != null));
var ranked = new List<Segment>();
// Pre-compute centroid similarities with content-type adjustments
foreach (var segment in candidates)
{
var baseSim = CosineSimilarity(segment.Embedding!, centroid);
var contentWeight = ComputeContentTypeWeight(segment, contentType);
segment.SalienceScore = baseSim * segment.PositionWeight * contentWeight;
}
// Greedy MMR: pick best, penalise similar, repeat
while (candidates.Count > 0)
{
var best = candidates
.Select(c => new {
Segment = c,
Score = _config.MmrLambda * c.SalienceScore
- (1 - _config.MmrLambda) * MaxSimToRanked(c, ranked)
})
.OrderByDescending(x => x.Score)
.First();
best.Segment.SalienceScore = 1.0 - ((double)ranked.Count / segments.Count);
ranked.Add(best.Segment);
candidates.Remove(best.Segment);
}
}
}
क्योंकि आउटपुट एक है श्रेणीबद्ध संग्रहYou can adapt anchor count to the synthesis model at runtime
public class AdaptiveSynthesizer
{
public int ComputeAnchorBudget(ModelProfile model, ExtractionResult extraction)
{
// Larger context windows → more anchors
var baseTokenBudget = model.ContextWindow / 4; // Reserve 25% for output
// More powerful models → can handle more complex synthesis
var complexityMultiplier = model.Tier switch
{
ModelTier.Small => 0.5, // tinyllama: fewer, simpler anchors
ModelTier.Medium => 1.0, // llama3.2:3b: standard
ModelTier.Large => 1.5, // llama3.1:8b+: more context, nuanced synthesis
_ => 1.0
};
var anchorBudget = (int)(baseTokenBudget * complexityMultiplier / _avgTokensPerSegment);
// Never exceed what we have
return Math.Min(anchorBudget, extraction.TopBySalience.Count);
}
public async Task<Summary> SynthesizeAsync(
ExtractionResult extraction,
ModelProfile model)
{
var budget = ComputeAnchorBudget(model, extraction);
// Take top-K from already-ranked segments
var anchors = extraction.TopBySalience.Take(budget).ToList();
// Synthesis model only sees what survived selection + adaptation
return await _llm.SynthesizeAsync(anchors, model);
}
}
यह अभी भी निर्णायक है समान इनपुट + एक ही मॉडल प्रोफ़ाइल. रैंकिंग एक बार होता है
इसका मतलब है आप कर सकते हैं
प्रमुख अंतर्दृष्टि Anchors संरचना है , नहीं गद्य. एम्बेडिंग और MMR deterministic हैं
Anchor संविदा उत्पत्ति शब्दावली में भिन्न हो सकती है, लेकिन एन्कोर्स के विपरीत नहीं होना चाहिए
एक कंक्रीट एन्कोर प्रतिनिधित्व
{
"policyVersion": "cfcd-v1",
"segments": [
{"id":"seg-12","text":"Reset requires holding button 10s","salience":0.92},
{"id":"seg-45","text":"Factory reset clears all settings","salience":0.88}
],
"coverage": "3.2% semantic sample",
"hedging": "sampled 3% - avoid definitive conclusions"
}
अनुवाद इस पैटर्न को और भी स्पष्ट रूप से प्रकट करता है
वाक्य को अनुवाद करें और आप मिलेंगे
एक विशाल संदर्भ विंडो के साथ भी मॉडल अभी भी "मुझे मुक्त लगता है
- देखा स्थानक्या मजबूत स्थानीय प्रमाण के रूप में माना जाता है
यह निर्णायक है: संरचनात्मक संकेतों को पैटर्न या पार्सर वर्गीकरण द्वारा पता लगाया जाता है
डिफ़ॉल्ट पॉलिसी
public class TermLedger
{
private readonly Dictionary<string, TermMapping> _mappings = new();
public record TermMapping(
string SourceTerm,
string TargetTerm,
float Confidence,
string FirstSeenChunkId,
int LastSeenChunkIndex, // Track recency
int VotesForCurrentTarget,
int TotalVotes, // Preserve history
string? ChallengerTarget = null,
int ChallengerVotes = 0,
float ChallengerConfidence = 0);
public void ProposeMapping(string source, string target, float confidence, string chunkId, int chunkIndex)
{
source = source.ToLowerInvariant().Trim();
if (_mappings.TryGetValue(source, out var existing))
{
if (existing.TargetTerm == target)
{
// Same as current: accumulate votes
_mappings[source] = existing with
{
Confidence = Math.Max(existing.Confidence, confidence),
VotesForCurrentTarget = existing.VotesForCurrentTarget + 1,
TotalVotes = existing.TotalVotes + 1,
LastSeenChunkIndex = chunkIndex
};
}
else if (existing.ChallengerTarget == target)
{
// Same as challenger: accumulate challenger votes
var newChallengerVotes = existing.ChallengerVotes + 1;
var newChallengerConfidence = Math.Max(existing.ChallengerConfidence, confidence);
// Switch if challenger has >= 2 votes AND higher confidence
if (newChallengerVotes >= 2 && newChallengerConfidence > existing.Confidence)
{
// Swap: old current becomes challenger, challenger becomes current
_mappings[source] = existing with
{
TargetTerm = target,
Confidence = newChallengerConfidence,
VotesForCurrentTarget = newChallengerVotes,
TotalVotes = existing.TotalVotes + 1,
LastSeenChunkIndex = chunkIndex,
ChallengerTarget = existing.TargetTerm, // Preserve old mapping as challenger
ChallengerVotes = existing.VotesForCurrentTarget,
ChallengerConfidence = existing.Confidence
};
}
else
{
_mappings[source] = existing with
{
ChallengerVotes = newChallengerVotes,
ChallengerConfidence = newChallengerConfidence,
TotalVotes = existing.TotalVotes + 1,
LastSeenChunkIndex = chunkIndex
};
}
}
else if (confidence > existing.ChallengerConfidence)
{
// New challenger replaces old challenger
_mappings[source] = existing with
{
ChallengerTarget = target,
ChallengerVotes = 1,
ChallengerConfidence = confidence,
TotalVotes = existing.TotalVotes + 1,
LastSeenChunkIndex = chunkIndex
};
}
}
else
{
_mappings[source] = new TermMapping(
source, target, confidence, chunkId, chunkIndex,
VotesForCurrentTarget: 1, TotalVotes: 1);
}
}
public string? GetCanonicalTranslation(string source)
{
source = source.ToLowerInvariant().Trim();
return _mappings.TryGetValue(source, out var mapping)
? mapping.TargetTerm
: null;
}
}
व्यावहार में आप भी मत विघटन चाहते हैं (या एक स्लाइडिंग विंडो
डिबगिंग के लिए यह क्यों महत्वपूर्ण है यदि अनुवाद फ्लिप करता है "factory reset" mid
chunk-12: "factory reset" → "Werkseinstellungen" (votes: 3, conf: 0.82)
chunk-47: challenger "Zurücksetzen" reaches 2 votes, conf: 0.91
chunk-47: SWITCH - "factory reset" → "Zurücksetzen" (old mapping preserved as challenger)
कोई अनुमान नहीं।
यह आपको देता है
इसीलिए शब्दावली संगतता से हल नहीं किया जा सकता है "just more context
सीएफसीडी करता है नहीं मॉडल मेमोरी दें
यह देता है तंत्र स्मृति
मॉडल
प्रणाली
समाप्ति नियम (निर्धारितM SK1 नमूना नहीं
T निर्दिष्ट किए बिनाN बाद के टुकड़े नष्ट हो जाते हैंयह अंतर सब कुछ है
flowchart TB
subgraph Model["Probabilistic Model"]
M1[Detect Salience]
M2[Generate Output]
end
subgraph System["Deterministic System"]
S1[Promote Anchors]
S2[Store in Ledger]
S3[Enforce on Generation]
S4[Expire Stale Context]
end
M1 --> S1 --> S2
S2 --> S3 --> M2
S2 --> S4
style Model stroke:#f59e0b,stroke-width:2px
style System stroke:#22c55e,stroke-width:3px
यहाँ एक प्रथम वस्तु के रूप में ledger के साथ पैटर्न है
flowchart LR
S[Stream: chunks/sentences] --> M[Model proposes salience]
M --> P[Promotion rules]
P --> L[Ledger / Anchors]
L --> G[Generation constrained by anchors]
G --> O[Output]
L --> E[Expiry rules]
E -.-> L
style L stroke:#22c55e,stroke-width:3px
style P stroke:#22c55e,stroke-width:2px
style E stroke:#22c55e,stroke-width:2px
style M stroke:#f59e0b,stroke-width:2px
style G stroke:#f59e0b,stroke-width:2px
हरित बक्से निर्णायक हैं।
तीन shifts
प्रोम्प्ट एक बन जाता है दृश्य खाता-पत्र का
That's the "grokM SK2 moment. The ledger is not contextMST4 ItMSC5is a contractMSP6
Anchors नहीं हैं "important text टाइपेड, संरचनात्मक तथ्य जो उत्पादन को प्रतिबंधित करता है
factory reset → restore factory settingsProductName, ModelNumber, UserIDpolicyVersion: "cfcd-v1", anchorSchemaVersion: 2मुद्दा यह है कि एंकर prose नहीं हैं
यह एक एनालॉग है
मस्तिष्क पूरे संवेदी प्रवाह को फिर से नहीं चलाता
वे
भाषा, एमएसके0, मोटर कौशल, एम एसके1 और धारणा सभी पर निर्भर करते हैं अवरोधित carry-forwardकच्चे रिकार्ड नहीं है
सीएफसीडी एक ही सिद्धांत है
जैविक प्रणाली |------------------|-----------------| ध्यान (अभिज्ञता के बारे में क्या पता है | संश्लेषण | ( | क्या याद रखना है |) | | | Anchor संवर्धन | प्रतिरोध (अवश्यक क्या है रिकार्ड करें
CFMoM और CFCD एक ही विचार भिन्न कोणों से देखे जाते हैं
| आयाम | पैटर्न | ||
|---|---|---|---|
| एकल प्रस्तावक अवरोधित अस्पष्टता | |||
| कई प्रस्तावक | प्रतिबंधित अस्पष्ट मोएम | ||
| लंबा-क्षितिज संदर्भ | सीमित अस्पष्ट संदर्भ खींचना |
सभी तीनों ने एक ही नियम का पालन किया
संभाव्यता प्रस्तावित
एक बार जब आप उस नियम को अंतर्निहित करते हैं
flowchart LR
subgraph CFP["Part 1: Constrained Fuzziness"]
P1[Single Proposer] --> C1[Constrainer] --> O1[Output]
end
subgraph CFMoM["Part 2: Constrained Fuzzy MoM"]
P2A[Proposer A] --> CS[Consensus Space]
P2B[Proposer B] --> CS
P2C[Proposer C] --> CS
CS --> C2[Coordination Constrainer] --> O2[Output]
end
subgraph CFCD["Part 3: Context Dragging"]
T1[Time T] --> A1[Anchors]
T2[Time T+1] --> A1
A1 --> C3[Constrained Generation] --> O3[Output]
end
style CFP stroke:#22c55e,stroke-width:2px
style CFMoM stroke:#3b82f6,stroke-width:2px
style CFCD stroke:#8b5cf6,stroke-width:2px
क्योंकि यह
दूसरे शब्दों में, यह उत्पादन के लिए अनुकूलित करता है
प्रतिरोधक |--------------|---------|---------------| | संदर्भ में सब कुछ बनाएँ असीमित लागत | पुनरावर्ती सारांश | ड्रिफ्टM SK1 विरोधाभास | Anchors are structure, not prose | | उम्मीद है मॉडल याद करता है कोई गारंटी नहीं | Per-request full re-processing इतिहास के साथ लागत स्केल | प्राकृतिक भाषा | सेमेंटिक ड्राइफ्ट | | | टाइपेड एङ्कर |, | स्पष्ट मानचित्रण | | One-sizeM SK1fits-all context अपशिष्ट क्षमता या अनाज मॉडल | श्रेणीबद्ध संग्रह से अनुकूल स्लाइजिंग
सबसे अधिक स्पष्ट एक आधार है जो CFCD व्यावहारिक बनाता है
| अल्पकालिक प्राथमिक | CFCD भूमिका |
|---|---|
| संकेत | प्रत्याशित प्रासंगिकता |
| बार्ड विंडो | कोई असंबंधित नहीं |
| बहिष्करण नियम भूल स्पष्ट है | |
| स्लाइडिंग समाप्ति स्थिर संदर्भ स्वचालित रूप से समाप्त होता है | |
| संकेत प्रसार एनकोर्स बिना उत्परिवर्तन के आगे बढ़ते हैं |
अल्पकालिक नहीं है "स्मरण करें decides what is allowed to be remembered, and for how long.
यही सीएफसीडी की जरूरत है
public class CFCDCoordinator
{
private readonly SignalSink _sink;
private readonly TermLedger _ledger;
private readonly TimeSpan _anchorLifetime = TimeSpan.FromHours(1);
public void PromoteAnchor(string term, string translation, string chunkId, int chunkIndex)
{
_ledger.ProposeMapping(term, translation, 0.8f, chunkId, chunkIndex);
// Emit signal for observability (key = chunkId for correlation)
_sink.Raise($"anchor.promoted:{term}", key: chunkId);
}
public void ExpireStaleAnchors()
{
var cutoff = DateTimeOffset.UtcNow - _anchorLifetime;
// Ledger entries older than cutoff without recent usage are removed
// This is deterministic, not model-decided
_ledger.ExpireOlderThan(cutoff);
_sink.Raise("anchors.expired");
}
}
एक संपूर्ण दस्तावेज़ अनुवाद पाइपलाइन के लिए इसे एक साथ लाना
public class CFCDTranslationPipeline
{
private readonly ILlmService _llm;
private readonly TermLedger _ledger;
private readonly SignalSink _sink;
private readonly int _seedChunks = 3; // K: configurable seed window
public async Task<TranslatedDocument> TranslateAsync(
Document source,
string targetLanguage)
{
var chunks = Chunker.Chunk(source, maxTokens: 500).ToList();
var translated = new List<TranslatedChunk>();
// Phase 1: Extract terminology candidates (first pass, fuzzy)
// Seed from first K chunks: front-loads terminology, avoids churn later
for (var i = 0; i < Math.Min(_seedChunks, chunks.Count); i++)
{
var chunk = chunks[i];
var candidates = await _llm.ExtractTerminologyAsync(chunk);
foreach (var term in candidates)
{
_ledger.ProposeMapping(
term.Source,
term.ProposedTranslation,
term.Confidence,
chunkId: chunk.Id,
chunkIndex: i);
}
}
_sink.Raise("terminology.seeded");
// Phase 2: Translate with ledger constraints
for (var i = 0; i < chunks.Count; i++)
{
var chunk = chunks[i];
// Get canonical translations for terms in this chunk
var constraints = ExtractConstraints(chunk, _ledger);
// Translate with constraints (model must respect ledger)
var result = await _llm.TranslateWithConstraintsAsync(
chunk,
targetLanguage,
constraints);
// Update ledger with any new terms (deterministic rules)
foreach (var newTerm in result.NewTerminology)
{
if (ShouldPromote(newTerm, _ledger))
{
_ledger.ProposeMapping(
newTerm.Source,
newTerm.Target,
newTerm.Confidence,
chunkId: chunk.Id,
chunkIndex: i);
_sink.Raise($"anchor.promoted:{newTerm.Source}");
}
}
translated.Add(result.Chunk);
}
return new TranslatedDocument(translated, _ledger.GetAllMappings());
}
private bool ShouldPromote(TermCandidate term, TermLedger ledger)
{
// Deterministic rules, not model judgment:
// - Proper nouns always promoted
// - Technical terms promoted if repeated
// - Common words never promoted
return term.Type == TermType.ProperNoun ||
(term.Type == TermType.Technical && term.OccurrenceCount >= 2);
}
}
अधिकांश एआई प्रणालियों द्वारा किया गया गलती यह मानना है कि बौद्धिकता याद करके बेहतर होता है अधिक.
व्यावहारिक रूप से ',' आसूचना तय करने के द्वारा स्केल करता है फिर कभी नहीं सोचना होगा.
सीएफसीडी यह है कि आप ऐसा कैसे करते हैं बिना अपने आप पर झूठ बोलते हुए
भाग | पैटर्न |------|---------|------| | 1 | अवरोधित अस्पष्टता एकल घटक | 2 | प्रतिबंधित अस्पष्ट मोएम बहुआयामी अवयव सीमित अस्पष्ट संदर्भ खींचना इस अनुच्छेद में | 4 | छवि सारणी व्यावहारिक कार्यान्वयन
सभी तीन नमूने एक ही अपरिवर्ती है संभाव्यात्मक घटक प्रस्तावित.
एलएलएम उपयोग के दस आदेश इन नियमों को संहिताबद्ध करना डिएसई वास्तुकला उन्हें कोड विकास के लिए लागू करता है बोट खोज उन्हें अनुरोध वर्गीकरण के लिए लागू करता है डॉक-सममैरिजर दस्तावेज पुनःप्राप्ति के लिए उन्हें लागू करता है. ImageSummarizerComment उन्हें छवि विश्लेषण के लिए लागू करता है
भिन्न डोमेन ड्यूम-सममाराइजर समांतर लम्बे के लिए संदर्भ खींचने का कार्यान्वयन करता है-form document generation - running summariesMST2 negative promptsMst3 entity continuityM st4 and drift detection maintain coherence across concurrent LLM calls
भाग 4 अब उपलब्ध है छवि सारणीकर्ता : एक सीमित अस्पष्ट छवि आरएजी इंजिन. यह एक तरंग में सभी तीन नमूने को कार्यान्वित करता है-आधारित छवि विश्लेषण पाइपलाइनM SK2ColorWave तथ्यों का संगणन करता है। github.comM SK1scottgal/lucidrag.
© 2026 Scott Galloway — Unlicense — All content and source code on this site is free to use, copy, modify, and sell.