> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Builder • Rust AI Agent SDK

> KnowledgeBuilder: Builder for Knowledge

# KnowledgeBuilder

> Defined in the [**knowledge**](../modules/knowledge) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Builder for Knowledge

## Fields

| Name     | Type              | Description |
| -------- | ----------------- | ----------- |
| `config` | `KnowledgeConfig` | -           |

## Methods

### `config`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn config(mut self, config: KnowledgeConfig) -> Self
```

Set config

**Parameters:**

| Name     | Type              |
| -------- | ----------------- |
| `config` | `KnowledgeConfig` |

### `chunking`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn chunking(mut self, config: ChunkingConfig) -> Self
```

Set chunking config

**Parameters:**

| Name     | Type             |
| -------- | ---------------- |
| `config` | `ChunkingConfig` |

### `retrieval_strategy`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn retrieval_strategy(mut self, strategy: RetrievalStrategy) -> Self
```

Set retrieval strategy

**Parameters:**

| Name       | Type                |
| ---------- | ------------------- |
| `strategy` | `RetrievalStrategy` |

### `build`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn build(self) -> Result<Knowledge>
```

Build the Knowledge instance

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/knowledge/mod.rs#L861">
  `praisonai/src/knowledge/mod.rs` at line 861
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Knowledge" icon="book" href="/docs/rust/knowledge" />

  <Card title="Rust Documents" icon="file-lines" href="/docs/rust/documents" />

  <Card title="Rust RAG" icon="magnifying-glass" href="/docs/rust/rag" />

  <Card title="Rust Agent UI" icon="display" href="/docs/rust/agent-ui-agui" />

  <Card title="Rust AGUI" icon="display" href="/docs/rust/agui" />
</CardGroup>
