Prompts
Prompts are the questions sent to AI providers. Each prompt belongs to a topic and is executed against all AI providers linked to the project. When created, prompts are automatically queued for execution and continue to run based on the project's schedule cadence.
List prompts
Retrieve prompts with analytics metrics. Requires aiVisibilityBrandId to specify which brand's perspective to use. Optionally filter by topic using aiVisibilityTopicId.
query GetAiVisibilityPrompts(
$accountId: ObjectID!
$aiVisibilityProjectId: ObjectID!
$aiVisibilityBrandId: ObjectID!
$dateRange: AiVisibilityDateRangeInput
$aiVisibilityTopicId: ObjectID
) {
getAiVisibilityPrompts(
accountId: $accountId
aiVisibilityProjectId: $aiVisibilityProjectId
aiVisibilityBrandId: $aiVisibilityBrandId
dateRange: $dateRange
aiVisibilityTopicId: $aiVisibilityTopicId
first: 20
orderBy: [{ field: avgVisibilityScore, direction: DESC }]
) {
nodes {
id
rawId
content
topicName
avgVisibilityScore
avgCitationQualityScore
avgBrandMentionQualityScore
avgBrandPosition
avgBrandSentiment
totalRuns
totalBrandCitations
totalBrandMentions
topBrands {
name
type
avgVisibilityScore
}
}
pageInfo {
hasNextPage
endCursor
}
totalCount
}
}
Sorting
Prompts can be sorted by: content, topicName, avgVisibilityScore, avgCitationQualityScore, avgBrandMentionQualityScore, avgBrandPosition, avgBrandSentiment, totalRuns, totalBrandMentions, totalBrandCitations.
Default sort is avgVisibilityScore DESC when a date range is provided, or content ASC when omitted.
Metrics
Each prompt includes these computed fields when a dateRange is provided:
| Field | Description |
|---|---|
avgVisibilityScore | Composite visibility score for this prompt |
avgCitationQualityScore | Average citation quality score |
avgBrandMentionQualityScore | Average mention quality score |
avgBrandPosition | Average citation position |
avgBrandSentiment | Average sentiment of brand mentions |
totalRuns | Total number of completed prompt runs |
totalBrandCitations | Total citations for the specified brand |
totalBrandMentions | Total mentions for the specified brand |
topBrands | Top 4 brands by visibility score |
Create a prompt
Create a prompt under a topic. The prompt is automatically queued for execution against all configured AI providers. Maximum content length is 2,500 characters.
mutation CreateAiVisibilityPrompt(
$accountId: ObjectID!
$aiVisibilityTopicId: ObjectID!
$content: String!
) {
createAiVisibilityPrompt(
input: {
accountId: $accountId
aiVisibilityTopicId: $aiVisibilityTopicId
content: $content
}
) {
aiVisibilityPrompt {
id
rawId
content
}
}
}
Prompt creation is subject to a per-project limit based on your subscription, the number of AI providers, and the schedule cadence. If the limit is reached, the mutation returns AI_VISIBILITY_PROMPTS_LIMIT_REACHED.
Delete a prompt
Soft-deletes a prompt. Existing prompt run data is preserved.
mutation DeleteAiVisibilityPrompt(
$accountId: ObjectID!
$aiVisibilityPromptId: ObjectID!
) {
deleteAiVisibilityPrompt(
input: {
accountId: $accountId
aiVisibilityPromptId: $aiVisibilityPromptId
}
) {
aiVisibilityPrompt {
id
}
}
}
Suggested prompts
Use AI to generate prompt suggestions for a specific topic and brand. Suggestions are cached -- calling generate again replaces the previous suggestions for that topic.
Get suggestions
query GetAiVisibilitySuggestedPrompts(
$accountId: ObjectID!
$aiVisibilityProjectId: ObjectID!
$aiVisibilityBrandId: ObjectID!
$aiVisibilityTopicId: ObjectID!
) {
getAiVisibilitySuggestedPrompts(
accountId: $accountId
aiVisibilityProjectId: $aiVisibilityProjectId
aiVisibilityBrandId: $aiVisibilityBrandId
aiVisibilityTopicId: $aiVisibilityTopicId
) {
id
content
}
}
Generate suggestions
mutation GenerateAiVisibilitySuggestedPrompts(
$accountId: ObjectID!
$aiVisibilityProjectId: ObjectID!
$aiVisibilityBrandId: ObjectID!
$aiVisibilityTopicId: ObjectID!
) {
generateAiVisibilitySuggestedPrompts(
input: {
accountId: $accountId
aiVisibilityProjectId: $aiVisibilityProjectId
aiVisibilityBrandId: $aiVisibilityBrandId
aiVisibilityTopicId: $aiVisibilityTopicId
}
) {
suggestions {
id
content
}
}
}
Schema reference
AiVisibilityPrompt-- Prompt typeAiVisibilityPromptDetails-- Prompt details with metricsAiVisibilitySuggestedPrompt-- Suggested prompt type