This module allows users to ask questions about the content of the current page, and the AI will provide answers based solely on that content. It can also process attachments and is designed to work with AI models that support large context windows.
Adds a block that lets a visitor ask questions about the page they are on. The AI answers from the content of that node only, so it does not pull in the rest of the site.
Features
- One block, placed on the content types you choose
- The answer comes from the current node, so it stays on topic
- Streamed answers, so text appears while the model writes it
- Hidden instructions that steer the answer without showing on the page
- A blocked words list, with your own message when a question hits it
- Your own model and temperature, or the default from the AI module
- Guardrails provided by the AI module are used
Requirements
- Drupal 10.4+ / 11.x / 12.x
- AI ^1, with a chat provider set up
- One node field that holds the content to answer from
Configuration
- Go to Structure, Block layout, and place the AI talk with Node Block.
- Choose the node field that holds the content.
- Choose the model and the temperature, or keep the default from the AI module.
- Under Pages or Content types, limit the block to the content types you want.
Usage
- Open a page that shows the block.
- Type a question about that page.
- The AI answers from the content of that page.
Instructions
An editor can add instructions that the AI reads but the visitor never sees. Use them to set the tone, or to add facts that are not in the field. You can type the instructions,
or upload them as a file.
Remarks
The module sends the instructions and the node content to the model with every question. A long page therefore fills a large part of the context window. Pick a model with a
large context window, or point the block at a shorter field.
Roadmap
- Read from more than one field
- Read the attachments of the node
- LongRAG, for long attachments
Similar modules
AI Search Block does the same thing across the whole site. Use that one to search everything, and this one to ask
about a single page.
Depends on
Dependencies of the latest stable release
- AI (Artificial Intelligence)
- block Drupal core
- config Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.