> For the complete documentation index, see [llms.txt](https://thesium.gitbook.io/thesium-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thesium.gitbook.io/thesium-docs/feature-deep-dives/ai-generation-layer.md).

# AI Generation Layer

Two AI artifacts are surfaced in the side panel: lore (the narrative section) and summary (the Trenches Pulse). They are produced by the same underlying pipeline but serve different purposes and have different freshness profiles.

<figure><img src="/files/4YPmRVk2plpi5ojShdJm" alt=""><figcaption></figcaption></figure>

## Pipeline architecture

The pipeline runs server-side. For any (token address, chain) query:

1. **Context retrieval.** The pipeline assembles a context bundle for the token: name and symbol from token info, structural metrics, recent feed content, tier-aware holder snapshot, and price-action shape over the most recent window.
2. **Prompt construction.** A task-specific system prompt is composed for either lore or summary. The prompt embeds the context bundle with explicit role separation between supplied facts and any inferences the model should make.
3. **LLM inference.** The composed prompt is sent to one or more frontier LLMs. The specific model is treated as a runtime configuration rather than a brand commitment, and may rotate without product changes as the frontier moves.
4. **Output validation.** The model output is parsed against a strict schema. Outputs that fail validation are retried or returned as null rather than passed through.
5. **Cache write.** Validated outputs are written to per-address caches and returned.

## Lore

Lore is a short, human-readable explanation of what the token is - meme origin, references, context, the joke or thesis being expressed. It exists because most low-cap tokens are completely opaque from their on-chain footprint alone: the symbol or name tells you nothing about why the token exists or whether anyone is supposed to care.

Lore freshness is low-priority: meme context does not change rapidly. The lore cache is treated as semi-permanent per address. The first request for a previously-unseen address triggers cold generation, which is the longest single-call latency in the system. Every subsequent request returns the cached output within a few hundred milliseconds.

## Summary

Summary is the Trenches Pulse: sentiment direction, conviction score 0–100, and three highlighted signals. Unlike lore, summary is time-sensitive - the right answer changes as the market changes. Cache freshness is short, and the polling loop refreshes summary on every tick.

The summary is also pool-aware: two pools on the same mint can receive different verdicts because the model reads the specific pool's market data. The verdict the user sees matches the pool they're looking at, not the highest-liquidity pool for the underlying token.

A position-size threshold parameter (default $1,000) filters the social inputs the model is shown to those above a USD floor. The goal is to read the room of meaningful capital, not to be skewed by dust transactions or shrimp churn.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://thesium.gitbook.io/thesium-docs/feature-deep-dives/ai-generation-layer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
