> For the complete documentation index, see [llms.txt](https://guardian.hedera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guardian.hedera.com/api-reference-guardian/platform/ai-suggestions.md).

# AI Suggestions

AI-powered recommendations for policies, schemas, and workflows.

## Get methodology suggestion

> Returns AI response to the current question

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"ai-suggestions","description":"AI-powered recommendations for policies, schemas, and workflows.","parent":"platform"}],"servers":[{"url":"/api/v1","description":"API v1"}],"paths":{"/ai-suggestions/ask":{"get":{"description":"Returns AI response to the current question","operationId":"AISuggestionsAPI_getAIAnswer","parameters":[{"name":"q","required":true,"in":"query","description":"The question of choosing a methodology","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation. Returns a comma-separated list of suggested methodology codes.","content":{"application/json":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Get methodology suggestion","tags":["ai-suggestions"]}}},"components":{"schemas":{"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}}}
```

## Rebuild AI vector

> Rebuilds vector based on policy data in the DB

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"ai-suggestions","description":"AI-powered recommendations for policies, schemas, and workflows.","parent":"platform"}],"servers":[{"url":"/api/v1","description":"API v1"}],"paths":{"/ai-suggestions/rebuild-vector":{"put":{"description":"Rebuilds vector based on policy data in the DB","operationId":"AISuggestionsAPI_rebuildVector","parameters":[],"responses":{"200":{"description":"Successful operation. Returns true when vector rebuild is complete.","content":{"application/json":{"schema":{"type":"boolean"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Rebuild AI vector","tags":["ai-suggestions"]}}},"components":{"schemas":{"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}}}
```

## Returns whether Glossary AI is enabled

> Lets the client know upfront whether it should show the IWA property mapping suggestions UI at all.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"ai-suggestions","description":"AI-powered recommendations for policies, schemas, and workflows.","parent":"platform"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/ai-suggestions/schema-properties/enabled":{"get":{"description":"Lets the client know upfront whether it should show the IWA property mapping suggestions UI at all.","operationId":"AISuggestionsAPI_getGlossaryAiEnabled","parameters":[],"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"type":"boolean"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}}},"summary":"Returns whether Glossary AI is enabled","tags":["ai-suggestions"]}}}}
```

## Suggest schema field properties

> Returns ranked IWA property candidates for each schema field, based on the schema sent in the request.

```json
{"openapi":"3.2.0","info":{"title":"Guardian","version":"3.7.1"},"tags":[{"name":"ai-suggestions","description":"AI-powered recommendations for policies, schemas, and workflows.","parent":"platform"}],"servers":[{"url":"/api/v1","description":"API v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"PropertySuggestionRequestDTO":{"type":"object","properties":{"schemaId":{"type":"string","description":"Id of the schema the field(s) needing a suggestion belong to, used for logging only"},"schema":{"description":"Live editor state of the schema (name, description, IWA version and fields) used as the context for the suggestions","allOf":[{"$ref":"#/components/schemas/PropertySuggestionSchemaInputDTO"}]},"fieldNames":{"description":"Names of the schema fields to return suggestions for","type":"array","items":{"type":"string"}}},"required":["schema","fieldNames"]},"PropertySuggestionSchemaInputDTO":{"type":"object","properties":{"name":{"type":"string","description":"Schema name"},"description":{"type":"string","description":"Schema description"},"iwaVersion":{"type":"string","description":"IWA dMRV specification version. Defaults to '1.0.0' when omitted.","enum":["1.0.0","3.0.0"]},"fields":{"description":"All fields currently in the editor, used as context for the suggestions","type":"array","items":{"$ref":"#/components/schemas/PropertySuggestionFieldInputDTO"}}},"required":["fields"]},"PropertySuggestionFieldInputDTO":{"type":"object","properties":{"name":{"type":"string","description":"Field name"},"title":{"type":"string","description":"Field title"},"description":{"type":"string","description":"Field description"},"type":{"type":"string","description":"Field type"},"currentProperty":{"type":"string","description":"IWA property currently assigned to the field, if any"}},"required":["name"]},"PropertySuggestionResponseDTO":{"type":"object","properties":{"available":{"type":"boolean"},"results":{"type":"array","items":{"$ref":"#/components/schemas/PropertySuggestionResultDTO"}}},"required":["available","results"]},"PropertySuggestionResultDTO":{"type":"object","properties":{"fieldName":{"type":"string"},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/PropertySuggestionCandidateDTO"}}},"required":["fieldName","candidates"]},"PropertySuggestionCandidateDTO":{"type":"object","properties":{"title":{"type":"string"},"confidence":{"type":"number"},"rationale":{"type":"string"},"description":{"type":"string","description":"What this property means, sourced from the IWA dMRV v3 specification. Omitted for IWA v1 properties."}},"required":["title","confidence","rationale"]},"UnauthorizedErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"ForbiddenErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"error":{"type":"string"}},"required":["statusCode","message"]},"InternalServerErrorDTO":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/ai-suggestions/schema-properties":{"post":{"description":"Returns ranked IWA property candidates for each schema field, based on the schema sent in the request.","operationId":"AISuggestionsAPI_getPropertySuggestions","parameters":[],"requestBody":{"required":true,"description":"Live schema state and the fields to tag.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertySuggestionRequestDTO"}}}},"responses":{"200":{"description":"Successful operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertySuggestionResponseDTO"}}}},"401":{"description":"Unauthorized request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedErrorDTO"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenErrorDTO"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}},"501":{"description":"Not Implemented. Glossary AI is not enabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalServerErrorDTO"}}}}},"summary":"Suggest schema field properties","tags":["ai-suggestions"]}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guardian.hedera.com/api-reference-guardian/platform/ai-suggestions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
