# `Nous.KnowledgeBase.Prompts`
[🔗](https://github.com/nyo16/nous/blob/v0.17.1/lib/nous/knowledge_base/prompts.ex#L1)

LLM prompt templates for knowledge base compilation, linking, auditing,
and output generation.

Every function here is pure: it takes already-loaded structs and returns the
prompt string the workflow node sends to the compiler model.

# `entry_summary`

```elixir
@type entry_summary() :: %{
  slug: String.t(),
  title: String.t(),
  entry_type: Nous.KnowledgeBase.Entry.entry_type(),
  confidence: float(),
  link_count: non_neg_integer()
}
```

One row of the compact entry listing handed to `audit_prompt/2`.

# `stats`

```elixir
@type stats() :: %{
  total_entries: non_neg_integer(),
  total_links: non_neg_integer(),
  total_documents: non_neg_integer()
}
```

Aggregate counts gathered by the health-check pipeline.

# `audit_prompt`

```elixir
@spec audit_prompt(stats(), [entry_summary()]) :: String.t()
```

Builds a prompt for auditing the knowledge base.

# `compilation_prompt`

```elixir
@spec compilation_prompt([Nous.KnowledgeBase.Document.t()], [map()]) :: String.t()
```

Builds a prompt for compiling raw documents into wiki entries.

# `extraction_prompt`

```elixir
@spec extraction_prompt([Nous.KnowledgeBase.Document.t()]) :: String.t()
```

Builds a prompt for extracting concepts from raw documents.

# `linking_prompt`

```elixir
@spec linking_prompt([Nous.KnowledgeBase.Entry.t()]) :: String.t()
```

Builds a prompt for generating links between wiki entries.

# `output_prompt`

```elixir
@spec output_prompt(
  String.t(),
  [Nous.KnowledgeBase.Entry.t()],
  :report | :summary | :slides
) ::
  String.t()
```

Builds a prompt for generating an output (report/summary/slides) from entries.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
