Skip to content

AI Source

The AI Source in Definer is a powerful feature that transforms how you interact with text online. It allows you to generate AI responses based on any text you select on a webpage, providing instant insights, explanations, or creative content.

Usage

The basic idea is the following:

  1. Configure your preferred AI provider in Definer Options.
  2. Set up prompts in advance (optional)
  3. Select text on any page to bring up the bubble with AI source.
  4. AI will "see" your selected text and generate a response based on it and your prompt.
  5. You can ask follow-up questions or generate more responses.

Without Prompts

If you don't have any prompts set up, the AI will ask you what you want to know about the selected text. You can then type your question in the input field.

With Prompts

If you have prompts set up, the AI will either automatically select your favorite prompt or ask you to choose one. You can quickly switch between the prompts and ask follow-up questions without reselecting the text. See how to set up prompts in the configuration section below.

Chat

The AI source is designed to simulate a chat with a knowledgeable assistant. It can provide explanations, summaries, creative content, and more.

You can have a conversation with the AI by asking follow-up questions or generating more responses. You can also regenerate, edit, and delete the responses to control the flow of the conversation.

When you edit or regenerate messages in the chat, you create a new branch. You can switch between the branches to explore different paths in the conversation.

Configuration

To customize AI source settings, navigate to:
OptionsSourcesAISettings.

Main: Basic

The "Main" tab is where you set up your global AI source configuration. It will be used in all prompts by default, but you can change it for each prompt individually.

For users who want to keep it simple, the main settings include only the most essential options. This includes 2-3 fields: Provider, Model, and API Key (for providers that require it).

main.avif

Provider

Choose your preferred AI provider from a variety of options. Provider is the service that hosts the AI model and processes your requests. It determines the AI model you can use and the pricing.

NOTE

Learn more about available providers in the Providers page.

provider.avif

Definer supports various provider types:

  • Paid - All models require payment (OpenAI, Anthropic, xAI)
  • Freeish - Mix of free and paid models (Google, Open Router)
  • Free - All models available at no cost (Ollama, LM Studio)

Model

Select which specific AI model to use from your chosen provider. Each model has unique capabilities, strengths, and weaknesses. Available models depend on the provider you selected.

NOTE

For guidance on choosing the right model, visit the Models page.

model.avif

API Key

For providers requiring authentication, you'll need to enter your personal API key.
Each provider has a different process for obtaining API keys. Generally, you'll need to sign up for an account on the provider's website and generate a key through their dashboard.

NOTE

Detailed instructions can be found in the API Keys page.

This field will not appear when you select providers that don't require an API key like Ollama and LM Studio.

Main: Advanced

To keep it simple and user-friendly, some advanced settings are hidden under the SHOW ALL OPTIONS button.

If you're an advanced user and want to get the most out of your AI model, click the button to reveal additional settings.

main-advanced.avif

API Host

The endpoint URL for your AI service. This is pre-configured for standard providers but can be customized for special use cases. For example, for proxying requests through your own server or using providers not included in Definer but compatible with the OpenAI API, which is currently a standard for many AI services.

Temperature

Controls how creative or predictable the AI's responses will be:

  • Lower values (closer to 0): More focused, consistent responses
  • Higher values (closer to 1): More creative, varied responses
  • Very high values (above 1): Unpredictable, chaotic responses

Top P

Adjusts the diversity of the AI's word choices:

  • Lower values: More focused on highly probable words
  • Higher values: More willing to consider a wider range of words

Max Tokens

Sets the maximum length of the AI's response, measured in tokens (roughly 4 characters each). Higher values allow for longer responses, while lower values keep things concise.

Prompts

The true power of AI Source comes from customized prompts that direct what the AI should do with your selected text. You can have multiple prompts set up for different scenarios, each with its own unique settings, and switch between them on the fly.

Prompts are so powerful because of the Liquid syntax support. This allows you to create dynamic prompts that adapt to the context of your selection, like asking the AI to explain a word in the context of a sentence or generate a summary of a paragraph.

Despite the high level of customization, prompts are easy to set up and manage. Using liquid syntax is as simple as adding {{variable}} placeholders in your prompt content.

Advanced users can also use the full power of Liquid syntax to create complex prompts that handle various scenarios and produce precisely the type of response they need.

For example, it's possible to write conditional expressions that change the prompt content based on the number of words or symbols in the selected text, the presence of specific keywords, or even the time of day. You can learn more about it on the Prompts page.

Managing Prompts

The "Prompts" tab is where you create, organize, and modify your prompts.

Create

Click NEW PROMPT to add a prompt

Organize

Toggle, rearrange, and mark favorites for easy access.

Favorite Prompt

To make a prompt a favorite, click the star icon next to it. A favorite prompt that will be used by default when you open the AI source.

Modify

Edit, duplicate, or delete prompts as needed.

Prompt Settings

Name

A descriptive name to help you identify the prompt's purpose (optional but recommended).

Content

The actual instructions for the AI. This supports the Liquid Template Language for dynamic content.

For example:

liquid
Explain "{{str}}" in the context of this sentence: "{{sentence}}"

In this template:

  • {{str}} will be replaced with your selected text
  • {{sentence}} will be replaced with the full sentence containing your selection

You can create sophisticated prompts that handle various scenarios and produce precisely the type of response you need. Learn more in the Prompts section.

Config

Each prompt can have its own unique settings that override your global configuration from the "Main" tab. This means you can use different providers, models, temperature, and other settings for different types of prompts.