File size: 7,390 Bytes
07c2476
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# Using the Chat Interface

The AI Imaging Agent provides a conversational interface for discovering and using imaging software. This guide explains how to interact with the chat interface effectively.

## Interface Layout

The interface consists of three main areas:

### Left Panel: Chat Conversation
- **Message History**: Your conversation with the agent
- **Rich Media Rendering**: Images, tool cards, and files are displayed inline
- **Input Box**: Type your messages at the bottom
- **File Upload**: Attach files via the paperclip icon or drag-and-drop

### Right Panel: Sidebar
- **Files Tab**: View uploaded files with format information
- **State Tab**: Debug information showing conversation state

### Header
- **Model Selector**: Choose which AI model to use
- **Settings**: Access configuration options

## Basic Workflow

### 1. Upload Files

Upload images or other files in several ways:

- **Drag and Drop**: Drag files directly onto the upload area
- **Click to Browse**: Click the upload area to select files
- **Attach to Message**: Use the paperclip icon in the input box

Files are automatically processed and metadata is extracted.

### 2. Describe Your Task

Use natural language to describe what you want to do:

!!! example "Good Task Descriptions"
    - "I want to segment the lungs from this CT scan"
    - "Help me detect tumors in this MRI"
    - "I need to register these two brain images"
    - "Extract text from this medical report"
    - "Classify the organ shown in this ultrasound"

### 3. Review Recommendations

The agent returns ranked tool recommendations with:

- **Tool Cards**: Each tool is presented in a card format
- **Accuracy Scores**: Confidence levels for each recommendation
- **Explanations**: Why each tool matches your request
- **Metadata**: Technical details about compatibility

### 4. Run Demos (Optional)

The agent may offer to run demos:

```

Agent: Would you like me to run the demo with your image?

```

Respond with affirmative language:
- "yes"
- "sure"
- "ok"
- "please"
- "go ahead"

The agent will execute the tool and show results.

## Multi-Turn Conversations

The agent maintains context across multiple messages:

!!! example "Multi-Turn Example"
    ```

    You: I have a lung CT scan [uploads file]

    

    Agent: I can see you have a DICOM CT image. What would you like to do with it?

    

    You: Segment the airways

    

    Agent: [Provides airway segmentation tool recommendations]

    

    You: What about segmenting the whole lung?

    

    Agent: [Provides lung segmentation tools, remembering you're working with CT]

    

    You: Show me alternatives

    

    Agent: [Provides additional options]

    ```


## Advanced Features

### Excluding Tools

Exclude specific tools using the `[EXCLUDE:...]` tag:

```

Find segmentation tools [EXCLUDE:totalsegmentator|medicalsam]

```

You can exclude multiple tools separated by `|`.

### Requesting Alternatives

Ask the agent to search with different strategies:

```

Can you search for alternatives?



Show me other options



Find different tools for this task

```

The agent can perform up to 3 alternative searches per conversation.

## Understanding Agent Responses

### Recommendation Cards

Each recommendation includes:

#### Header
- **Rank Number**: 1, 2, 3 (1 = best match)
- **Tool Name**: Software/tool identifier
- **Accuracy Score**: 0-100% confidence

#### Body
- **Description**: What the tool does
- **Explanation**: Why it matches your task
- **Demo Link**: Click to visit runnable example

#### Footer Metadata
- **Modalities**: CT, MRI, X-ray, etc.
- **Dimensions**: 2D, 3D, 4D
- **Formats**: Supported file formats (DICOM, NIfTI, etc.)
- **License**: Software license information
- **Tags**: Categorization and keywords

### Execution Traces

When demos run, you'll see execution details:

```

<details>

<summary>Tool Execution Trace</summary>



Image uploaded to Gradio Space

Processing started...

Result: Success

Output saved to: result.png

</details>

```

Click to expand and see full execution logs.

### Clarification Questions

Sometimes the agent needs more information:

```

Agent: I found several segmentation tools. Which organ are you trying to segment?



You: The liver



Agent: [Provides liver-specific segmentation tools]

```

## File Management

### Uploaded Files List

The sidebar shows all uploaded files with:

- **Filename**: Original file name
- **Format**: File type/extension
- **Size**: File size
- **Preview**: Thumbnail (for images)

### Image Previews

Medical images are automatically converted:

- **DICOM**: PNG previews; 3D series use orthogonal composite views (MIPs + central slices) rather than a single slice
- **NIfTI**: PNG previews built from orthogonal composite views of the volume
- **TIFF Stacks**: PNG previews built from orthogonal composite views of the stack
- **Standard 2D Images**: Resized PNG preview of the original image

Previews are used for VLM analysis while preserving original format metadata.

### Removing Files

Click the 'X' button next to a file to remove it from the current session.

## Conversation State

The debug sidebar shows:

### Current State
- **Status**: idle, processing, waiting
- **Conversation Turn**: Current turn number
- **Excluded Tools**: Tools filtered from results

### Preview Images
- Images prepared for VLM analysis
- Format conversions applied

## Tips for Effective Interaction

!!! tip "Be Specific About Requirements"
    Mention specific needs:

    

    - "I need a tool that works with NIfTI files"

    - "Must support 3D volumes"

    - "Looking for open-source options"


!!! tip "Use Conversational Language"
    Natural language works best:

    

    - ✅ "Help me find tool that segments kidneys"

    - ❌ "kidney_segmentation_tool filter:3D"


!!! tip "Iterate Based on Results"
    If initial results aren't perfect, refine:

    

    - "Can you find tools with higher accuracy?"

    - "Show me open-source alternatives"

    - "What about tools that support DICOM?"


!!! tip "Ask Follow-Up Questions"
    The agent maintains context:

    

    - "What about the second recommendation?"

    - "Can you compare these two tools?"

    - "Which one is fastest?"


## Troubleshooting

### No Recommendations

If the agent can't find suitable tools:

- Try rephrasing your query
- Be more specific about the task
- Check that your file uploaded successfully
- Ensure your task matches the catalog domain (imaging/medical)

### Wrong Recommendations

If recommendations don't match:

- Provide more context about your specific needs
- Mention required file format support
- Specify modality or domain
- Use the exclude feature to filter out irrelevant tools

### Demo Execution Fails

If a demo doesn't run:

- Check your internet connection
- Verify the demo link is still active
- Try a different recommended tool
- Check file format compatibility

## Next Steps

- Learn about [Supported File Formats](file-formats.md)
- Understand [How Recommendations Work](recommendations.md)
- Explore [Running Demos](running-demos.md)
- Check out [Advanced Features](advanced-features.md)