Chat - Writer AI Studio

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

Agents with the chat capability can answer questions with tailored responses based on topics, personas, or data. You can connect the chat agent to a Knowledge Graph to answer questions about your company’s data.

Building an agent with chat

To build an agent with chat capabilities, choose the Chat option after clicking Build an agent in AI Studio.

Write a welcome message

Next, create a welcome message. A welcome message is the first message your users see. Greet them, tell them how to use the chat, and include any special instructions or anything else they should know.

Create an avatar

Choose an avatar for your chat. This can be your company logo or any other image you prefer.

Currently only .svg files are supported.

Choose a mode

To choose the right mode for your chat, decide how your users should interact with the agent. If you want users to ask general questions, choose the General chat mode. If you want users to ask specific questions about your company’s data, choose the Knowledge Graph mode. If you want users to ask questions about specific documents they provide, choose the Document mode. You can also select multiple modes for your agent.

Knowledge Graph lets you ask questions about your company’s data and get reliable, accurate answers. It uses multiple internal sources, making it easy to find information even if you’re not sure where it’s stored. Read more here.

The following modes are available:

Provide instructions

All of the modes allow you to provide instructions. Instructions are the system messages that reach the LLM to provide context or structure around how your chat responds to requests.

For example, you can use instructions to:

  1. Request answers in a specific language by providing examples.
  2. Patch stale data in your Knowledge Graph that’s hard to retrieve by providing additional information.
  3. Provide context about the users and how to address them.
  4. Set limits on the topics that the agent can answer.

Your instructions tell the LLM what answers to generate and how to format them.

Configure Knowledge Graph settings

When you enable Knowledge Graph mode for a chat agent, you can access advanced configuration options to fine-tune how the agent searches, ranks, and retrieves content from your Knowledge Graph. These settings control the balance between keyword and semantic search, how closely responses match source material, relevance thresholds, and response length.

Access configuration options

To configure Knowledge Graph settings for your chat agent:

  1. Enable Knowledge Graph mode: In your chat agent configuration, turn on the Knowledge Graph mode toggle
  2. Open configuration: Click the configuration slider in the top right corner of the Knowledge Graph mode box when Knowledge Graph mode is enabled
  3. Adjust settings: Use the sliders and options in the configuration panel to customize behavior

Configuration parameters

Grounding level

Controls how closely responses must match source material. This setting determines how much creative interpretation the AI can apply to Knowledge Graph content.How it works:

Examples:

When to adjust:

Top-k

Controls the balance between keyword and semantic search in ranking results. This parameter determines how the system prioritizes different types of matching.How it works:

When to adjust:

Max tokens

Maximum number of tokens the model can generate in the response. This controls the length of the AI’s answer.How it works:

When to adjust:

Sub-question count

Maximum number of sub-questions to generate when processing complex queries. Higher values allow the system to break down complex questions into more detailed sub-queries.How it works:

When to adjust:

Weight distribution

Controls how many text snippets to retrieve from the Knowledge Graph for context. This works together with the Top-k setting to control best matches vs broader coverage.How it works:

Important notes:

When to adjust:

Keyword relevance threshold

Controls how closely keyword matches must align with your query. Higher settings require closer matches, while lower settings allow broader keyword relevance in results.How it works:

When to adjust:

Semantic relevance threshold

Controls how closely results must match the meaning of your query. Higher settings require stronger semantic similarity, while lower settings allow varied interpretations.How it works:

When to adjust:

Common configuration patterns

The default configuration for Knowledge Graph mode handles most use cases. You can adjust the configuration to your specific needs. Below are some common configuration patterns for different use cases.

Research and analysis

Use this configuration for comprehensive research tasks where you need thorough analysis. Higher sub-questions and broader coverage provide more context.Settings:

Quick answers

Use this configuration for fast, focused responses where speed and precision matter more than comprehensive analysis.Settings:

Creative content generation

Use this configuration when you want the AI to interpret and build upon source material creatively.Settings:

How parameters work together

Some parameters interact in ways that affect both results and performance:

Performance considerations

Best practices

  1. Start with defaults: Begin with the default configuration and adjust based on your specific needs
  2. Test incrementally: Change one parameter at a time to understand its effect
  3. Consider your use case: Different applications, like research, Q&A, and content generation, benefit from different configurations
  4. Monitor performance: Track how different configurations affect response quality and processing time
  5. Balance precision and recall: Higher Top-k values give more precise results but may miss relevant content

Apply default settings

If you’ve made changes and want to return to the recommended default configuration, click Apply default settings in the configuration panel. This resets all parameters to their optimal values for general Knowledge Graph queries.