# Collection Schemas

Collection schemas describe the expected structure of a set of documents, or a set of entities that you’d want associated with each individual document for filtering purposes. Schemas are used by [Smart Filtering](https://docs.credal.ai/user-guide/platform/agent-builder/configuration/add-connectors/document-collections/smart-filtering-beta) to narrow search results to the most relevant documents.

> For example, a set of sales call transcripts could have a Client Name field. A schema is a way to specify the expected structure to Credal so that we can filter data and only send the relevant pieces of information to the LLM. They can be specified by pressing the Add Schema button on any document collection and specifying the expected fields and their type.

If you specify that a field “Has a fixed set of values”, then for metadata that is NOT [AI Entity Extracted](https://docs.credal.ai/user-guide/platform/agent-builder/configuration/add-connectors/document-collections/ai-entity-extraction-beta), Credal will automatically determine the set of possible values at query time. If there are a large number of entities, Credal may not be able to determine the set of values and may skip this step.

![Metadata schema configuration for a document collection showing expected fields and their types](/media/t/75c5dc71-055f-4496-bcaf-6966eeb0b645/p/6557597f-ed9e-4a60-b7d4-61f66fcfad15/8bbf613bd984755132066ea11fcdaa969a8c3dd0bcea791e5becf2c871a8da3a.png/raw)

## Related pages

- [Connectors](./platform-agents-configure-steps-connectors-overview.md)
- [Data Sources](./platform-agents-configure-steps-connectors-data.md)
- [Actions](./platform-agents-configure-steps-connectors-saas.md)
- [Document Collections](./platform-agents-configure-steps-connectors-document-collections.md)
- [Smart Filtering (beta)](./platform-integrations-metadata-and-smart-filtering-smart-filtering.md)
- [AI Entity Extraction (beta)](./platform-integrations-metadata-and-smart-filtering-ai-entity-extraction.md)
- [Bring Your Own Custom Data Sources](./platform-integrations-bring-your-own-data.md)
- [Credal MCP Servers](./platform-agents-configure-steps-connectors-mcp-servers.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
