Back to Knowledge Base

Chat Interactions

Chat with Dataset Query Enabled

Overview

Flow ID: rag-enabled-chat
Category: Chat Interactions
Estimated Duration: 2-5 minutes per exchange
User Role: All Users
Complexity: Moderate

Purpose: This flow enables users to have conversations with the AI where responses are informed by a specific dataset (corpus) of documents. When dataset query is enabled, the system automatically searches your uploaded documents for relevant information and includes that context in the AI's response, resulting in more accurate, grounded answers based on your specific knowledge base.

Related Flows

Prerequisites

Before starting, users must have:

  • Application installed and running
  • At least one AI language model uploaded and active
  • At least one dataset (corpus) uploaded and available
  • The desired dataset set as the active dataset in settings
  • Understanding that dataset query adds processing time to responses

Step-by-Step Flow

Main Path (Happy Path)

Step 1: Verify Dataset is Configured

  • User Action: Before starting a chat, verify that a dataset is available and active
  • System Response: Dataset status can be checked in Settings or will be visible in chat interface
  • UI Elements Visible:
    • Settings page showing active dataset (if checking there)
    • OR chat interface showing dataset selector
  • Visual Cues: Active dataset indicated by name or status indicator
  • Note: See corpus-activation.md for how to activate a dataset if needed

Step 2: Navigate to Chat or Create New Chat

  • User Action: Go to Chat page (click "Chat" in navigation) or start a new conversation
  • System Response: Chat interface loads
  • UI Elements Visible:
    • Chat page with conversation area
    • Text input box at bottom
    • Dataset selector/toggle (collapsible control, usually 100px wide)
    • Send button
    • Previous messages (if continuing existing chat)
  • Visual Cues: Dataset icon visible in input area

Step 3: Locate Dataset Control

  • User Action: Look for the dataset toggle control, typically in the message input area
  • System Response: N/A (static UI element)
  • UI Elements Visible:
    • Dataset icon (brain or database symbol)
    • Text showing current dataset status ("ON" or "OFF" and dataset name)
    • Collapsible selector that expands when hovered
  • Visual Cues:
    • Icon color indicates status (blue for enabled, gray for disabled)
    • Control is usually in the bottom-left of input area

Step 4: Enable Dataset Query

  • User Action: Click the dataset icon or toggle to enable dataset query
  • System Response:
    • Dataset selector may expand to show full width (from 100px to ~235px)
    • Dropdown appears showing available datasets
    • Current selection is highlighted
    • Toggle switches to "ON" state
  • UI Elements Visible:
    • Expanded dataset selector
    • Dropdown list of available datasets
    • Dataset names
    • Currently selected dataset highlighted
    • "ON" indicator
  • Visual Cues:
    • Icon changes color (typically gray → blue)
    • Icon may change from "OFF" to "ON" symbol
    • Border or background color change indicates active state
    • Dataset name becomes visible

Step 5: Confirm Correct Dataset Selected

  • User Action: Review the selected dataset name to ensure it's the right one for your question
  • System Response: Selected dataset name is displayed
  • UI Elements Visible:
    • Dataset name in the selector
    • Dropdown remains open showing all options
  • Visual Cues: Selected dataset has different styling (highlighted, checkmark, or bold)
  • Note: If wrong dataset is selected, click dropdown to choose a different one

Step 6: Compose Question for Dataset

  • User Action: Type a question that should be answered using the dataset documents
  • System Response:
    • Text appears in input box as typed
    • Send button becomes enabled
    • Dataset remains enabled (icon stays blue)
  • UI Elements Visible:
    • Text input with your question
    • Enabled send button
    • Active dataset indicator
    • Character count (if applicable)
  • Visual Cues:
    • Dataset icon remains blue indicating dataset query is active
    • Standard text input behavior

Step 7: Send Message

  • User Action: Click send button or press Enter
  • System Response:
    • Message is sent
    • Text input clears
    • User message appears in conversation
    • System begins processing with dataset query
    • Loading indicator appears
  • UI Elements Visible:
    • User's message in conversation thread
    • Loading indicator with status text
    • May show specific status: "Searching dataset..." or "Querying documents..."
  • Visual Cues:
    • Animated loading indicator
    • Status message indicates dataset is being searched
    • May be slightly longer loading time than without dataset

Step 8: System Searches Dataset

  • User Action: Wait (no action required)
  • System Response:
    • System converts your question into a search query
    • Searches through dataset documents for relevant information
    • Identifies top matches (typically 5 results)
    • Extracts relevant passages
    • Prepares context for AI
  • UI Elements Visible:
    • Loading indicator continues
    • Status may update: "Found X relevant passages" or similar
    • Progress indication
  • Visual Cues:
    • Animated indicator shows system is working
    • Process may take 2-5 seconds longer than normal chat

Step 9: AI Generates Response with Dataset Context

  • User Action: Continue waiting
  • System Response:
    • AI receives your question plus relevant dataset passages
    • AI formulates response using both its knowledge and the dataset information
    • Response begins streaming
  • UI Elements Visible:
    • AI response bubble begins appearing
    • Text streams in progressively
    • Dataset icon may appear near the response
  • Visual Cues:
    • Streaming text animation
    • Response appears in AI message style

Step 10: View Response with Dataset References

  • User Action: Read the AI's response
  • System Response:
    • Complete response is displayed
    • Response may include references to source documents
    • May see specific formatting for dataset-sourced information
  • UI Elements Visible:
    • Full AI response text
    • Possibly: Special icon or indicator showing dataset was used
    • Possibly: Expandable section showing which dataset passages were used
    • Action buttons (Copy, Redo, Like/Dislike)
    • Dataset results icon (if results were found and used)
  • Visual Cues:
    • Response may have distinct formatting for dataset-sourced content
    • Dataset results icon (stacked layers symbol) may appear

Step 11: Optional - View Source Passages

  • User Action: If a dataset results icon appears, hover over or click it to see source passages
  • System Response: Tooltip or expandable panel shows the actual passages from your documents that were used
  • UI Elements Visible:
    • Popup or panel displaying dataset passages
    • For each passage:
      • Block name (document identifier)
      • Critical question (if using Blockify format)
      • Trusted answer (the actual content)
      • Similarity score (percentage match)
  • Visual Cues:
    • Green-bordered boxes for dataset content
    • Percentage indicators showing relevance
    • Clear formatting distinguishes source material from AI response

Step 12: Continue Conversation with Dataset Enabled

  • User Action: Type another question in the input box
  • System Response: Dataset remains enabled for subsequent messages
  • UI Elements Visible:
    • Text input ready
    • Dataset icon still showing "ON" (blue)
    • Previous conversation visible above
  • Visual Cues: Dataset status persists (stays blue)
  • Note: Each subsequent message will also query the dataset unless you disable it

Step 13: Optional - Disable Dataset for Next Message

  • User Action: Click dataset icon to toggle it OFF if you want to ask a question without dataset query
  • System Response:
    • Dataset selector collapses back to icon-only
    • Icon color changes to gray/inactive
    • Shows "OFF" state
  • UI Elements Visible:
    • Collapsed dataset control (100px width)
    • Gray/inactive icon
    • "OFF" indicator
  • Visual Cues: Color change from blue to gray indicates dataset is no longer active

Final Step: Dataset-Enhanced Conversation

  • Success Indicator:
    • Responses reference specific information from your documents
    • Dataset results icon appears when relevant passages are found
    • Answers are more specific and accurate to your data
    • Can view source passages to verify information
  • System State Change:
    • Conversation history includes both dataset-queried and non-dataset messages
    • Each message retains metadata about whether dataset was used
    • Dataset remains active or inactive based on last toggle state
  • Next Possible Actions:
    • Continue asking dataset-related questions
    • Toggle dataset off for general questions
    • View and verify source passages
    • Export conversation with dataset references
    • Switch to a different dataset
    • Continue conversation with context maintained

Alternative Paths & Strategies

Strategy A: Toggle Dataset On/Off During Conversation

When to use: User wants to mix dataset-specific questions with general AI questions in the same chat

Steps:

  1. Start conversation with dataset enabled
  2. Ask dataset-specific question, get response
  3. Toggle dataset OFF for next message
  4. Ask general question without dataset
  5. Toggle dataset back ON for another dataset question
  6. Continue alternating as needed

Strategy B: Compare Multiple Datasets

When to use: User has multiple datasets and wants to compare information across them

Steps:

  1. Enable dataset query and select first dataset
  2. Ask question, note response
  3. Open dataset dropdown
  4. Select second dataset
  5. Ask same or similar question
  6. Compare responses to see differences in information
  7. Can document which dataset provides better information for specific topics

Strategy C: Verify AI Claims with Dataset

When to use: User gets an AI response without dataset and wants to verify against documents

Steps:

  1. Ask question with dataset OFF, get general AI response
  2. Enable dataset query
  3. Ask "Can you verify that using my documents?" or rephrase original question
  4. Compare general response to dataset-grounded response
  5. View source passages to validate claims

Strategy D: Drill Down on Dataset Results

When to use: User wants more detail from the source documents

Steps:

  1. Ask initial question with dataset enabled
  2. View response and source passages
  3. Click on or reference specific passage in follow-up
  4. Ask "Tell me more about [specific passage]"
  5. AI focuses on that specific document content
  6. Continue drilling into specifics

Error States & Recovery

Error 1: No Dataset Selected/Available

Cause: User tries to enable dataset query but no dataset is configured
User Experience:

  • Dataset toggle may not work or show disabled state
  • Error message: "No dataset available" or "Please upload a dataset"
  • Icon may be grayed out and unclickable

Recovery Steps:

  1. Navigate to Settings or Datasets page
  2. Upload a dataset if none exist (see corpus-upload.md)
  3. Activate a dataset if one exists but isn't active (see corpus-activation.md)
  4. Return to Chat and enable dataset query
  5. Dataset should now be selectable

Error 2: Dataset Search Returns No Results

Cause: Question doesn't match any content in the dataset
User Experience:

  • Response may indicate "No relevant information found in dataset"
  • AI provides general response without dataset grounding
  • Dataset results icon may not appear
  • Response might state "I don't see relevant information in your documents about..."

Recovery Steps:

  1. Rephrase question using different terms
  2. Make question more general or specific
  3. Verify question relates to content actually in your dataset
  4. Check if correct dataset is selected
  5. If no results consistently, may need to add more documents to dataset

QA Note: This is not a technical error but expected behavior when dataset lacks relevant information. No system error occurs.

Error 3: Dataset Loading Failed

Cause: Technical issue loading the dataset into memory
User Experience:

  • Error message: "Failed to load dataset" or "Dataset unavailable"
  • Dataset toggle may show error state
  • Cannot complete query

Recovery Steps:

  1. Wait a moment and try again
  2. Refresh the page
  3. Check if dataset file still exists (Settings > Datasets)
  4. Try selecting a different dataset
  5. Restart application if issue persists

Error 4: Embedding Model Not Available

Cause: No embedding model is loaded (required for dataset search)
User Experience:

  • Error message: "Embedding model required for dataset query"
  • Dataset feature may be disabled entirely
  • Cannot enable dataset toggle

Recovery Steps:

  1. Navigate to Settings
  2. Upload an embedding model if none exist
  3. Select an embedding model as active
  4. Wait for model to load
  5. Return to Chat and try enabling dataset again

Error 5: Query Takes Too Long / Times Out

Cause: Very large dataset or complex query
User Experience:

  • Loading indicator continues for extended time (>30 seconds)
  • May eventually timeout with error message
  • Response may fail to generate

Recovery Steps:

  1. Wait a bit longer (large datasets can take time)
  2. Simplify your question
  3. Check system resources (RAM, CPU)
  4. Consider breaking dataset into smaller, topic-specific datasets
  5. Try question again after timeout

Version History

Date Version Author Changes
2025-10-04 1.1 Iternal Technologies Initial comprehensive documentation

Notes

Important Considerations:

  • Dataset search adds 2-5 seconds to response time but significantly improves accuracy
  • The number of results used (typically 5) can be configured in chat settings
  • Similarity scores show how well each passage matches your question (higher is better)
  • Dataset query uses an embedding model (separate from the chat model) to search documents
  • Very large datasets may take longer to search; consider breaking into topic-specific sets
  • Dataset feature requires both a chat model and an embedding model to be configured

Best Practices for Dataset Query:

  • Use clear, specific questions that relate to your document content
  • Enable dataset when you need factual information from your documents
  • Disable dataset for general questions that don't require specific document references
  • Review source passages to verify the AI correctly interpreted the information
  • Organize documents into focused datasets by topic for faster, more relevant results
  • Include metadata or clear document names to help identify source materials

Common User Questions:

  • "Why does it take longer with dataset enabled?" - The system must search through all documents to find relevant passages
  • "How does it know which documents to use?" - Semantic search finds the most similar content to your question
  • "Can I see the exact source?" - Yes, hover over or click the dataset results icon
  • "What if my question isn't in the dataset?" - The AI will provide a general response or indicate no relevant information was found
  • "How many documents can I have in a dataset?" - Thousands, but larger datasets take longer to search

Trigger

What initiates this flow:

  • User manually initiates

Specific trigger: User wants to ask questions that should be answered using information from their specific documents, typically because:

  • They have technical documentation and need accurate answers from it
  • They want to chat about specific company information
  • They need to reference specific content from uploaded documents
  • They want answers grounded in their own data rather than general AI knowledge
  • They're conducting research using a curated document collection

User Intent Analysis

Primary Intent

Ask questions that are answered using information specifically from the user's uploaded document collection, ensuring responses are grounded in accurate, user-provided information rather than relying solely on the AI's general training.

Secondary Intents

  • Verify information exists in their documents
  • Get specific quotes or references from documents
  • Explore content across multiple documents simultaneously
  • Cross-reference information from different sources
  • Ensure factual accuracy by grounding responses in known data
  • Save time compared to manually searching through documents

Subintents

  • Quickly identify relevant information in large document sets
  • Get synthesized answers that combine multiple document sources
  • Understand relationships between concepts across documents
  • Validate that claimed information actually exists in source materials
Free Trial

Download Blockify for your PC

Experience our 100% Local and Secure AI-powered chat application on your Windows PC

✓ 100% Local and Secure ✓ Windows 10/11 Support ✓ Requires GPU or Intel Ultra CPU
Start AirgapAI Free Trial
Free Trial

Try Blockify via API or Run it Yourself

Run a full powered version of Blockify via API or on your own AI Server, requires Intel Xeon or Intel/NVIDIA/AMD GPUs

✓ Cloud API or 100% Local ✓ Fine Tuned LLMs ✓ Immediate Value
Start Blockify API Free Trial