Spaces:
Running
Running
File size: 7,089 Bytes
b16e7a5 |
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 |
# UI/UX Brainstorm: Mode Selection & API Key Experience
**Date**: 2025-11-28
**Status**: IMPLEMENTED (2025-11-28)
**Related**: Issues #52, #53, PR #58
---
## CRITICAL FINDING: Anthropic Key is Nearly Useless
**Code verification** (2025-11-28):
```
grep -r "AnthropicChatClient" src/ β NO RESULTS
grep -r "OpenAIChatClient" src/ β 22 RESULTS (all Magentic agents)
```
The `agent-framework` package (Microsoft's Magentic) **ONLY** has `OpenAIChatClient`.
There is no `AnthropicChatClient`. This means:
| Feature | OpenAI Key | Anthropic Key |
|---------|------------|---------------|
| Simple mode (Judge LLM) | β
GPT-5.1 | β
Claude Sonnet 4.5 |
| Advanced mode (Multi-agent) | β
Full orchestration | β **DOES NOT WORK** |
| Value proposition | Full access | Simple mode only |
**Decision**: Keep Anthropic support for Simple mode, but ensure UX clearly differentiates capabilities.
---
## Current State (After PR #58)
### What Users See (Screenshot 2025-11-28)
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β‘ Examples β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββ€
β β Orchestrator Mode β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββ€
β What drugs improve female libido post-menopause? β simple β
β Clinical trials for erectile dysfunction altern... β advanced β
β Evidence for testosterone therapy in women with... β simple β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β βοΈ Mode & API Key (Free tier works!) [βΌ] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Orchestrator Mode β
β β‘ Simple: Fast (Free/Any Key) | π¬ Advanced: Deep Multi-Agent (OpenAI Key Only) β
β [β simple] [β advanced] β
β β
β π API Key (Optional) β
β Leave empty for free tier. Auto-detects provider from key prefix. β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β sk-... (OpenAI) or sk-ant-... (Anthropic) β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
### Observations from Screenshot
1. **Examples table**: 2 columns (Query + Mode) - clean, one example now shows "advanced" β
2. **One example shows "advanced"**: Improves discoverability of Advanced mode β
3. **Accordion collapsed by default**: Still collapsed, but with more inviting label β
4. **Placeholder mentions Anthropic**: Correct, but now clearly tied to Simple mode only via info text β
5. **"Advanced: Requires OpenAI key"**: Now more prominent with emojis and clearer phrasing in info text β
### The Two Modes
| Mode | Backend | Capabilities | Requirements |
|------|---------|--------------|--------------|
| **Simple** | Linear orchestrator | Search β Judge β Report (single pass) | None (free tier) or any API key |
| **Advanced** | Magentic multi-agent | SearchAgent, JudgeAgent, HypothesisAgent, ReportAgent working together with iterative refinement | **OpenAI API key only** |
---
## Problems Identified (Addressed)
### P1: Advanced Mode is Hidden β ADDRESSED
- **Fix**: One example now shows "advanced" mode.
- **Fix**: Accordion label is more descriptive.
### P2: Mode/Key Relationship is Unclear β ADDRESSED
- **Fix**: `gr.Radio` info text clearly states "OpenAI Key Only" for Advanced mode, using emojis for emphasis.
### P3: No Incentive to Try Advanced β PARTIALLY ADDRESSED
- **Fix**: Emojis and "Deep Multi-Agent" hint at the value. Further marketing/documentation still needed for full "wow" moment.
### P4: Anthropic Users Left Out β ADDRESSED (Clarified)
- **Fix**: Anthropic keys still work for Simple mode, and the info text clarifies the limitation for Advanced mode.
---
## Options to Consider (Decision Made)
The recommendation of **Modified Option A (Better Education + Examples)** with slight modification to accordion label was implemented.
---
## Implementation Notes (Completed)
```python
# From src/app.py
examples=[
["What drugs improve female libido post-menopause?", "simple"],
["Clinical trials for erectile dysfunction alternatives to PDE5 inhibitors?", "advanced"], # Changed
["Evidence for testosterone therapy in women with HSDD?", "simple"],
],
additional_inputs_accordion=gr.Accordion(
label="βοΈ Mode & API Key (Free tier works!)", # Changed
open=False
),
gr.Radio(
choices=["simple", "advanced"],
value="simple",
label="Orchestrator Mode",
info=( # Changed
"β‘ Simple: Fast (Free/Any Key) | "
"π¬ Advanced: Deep Multi-Agent (OpenAI Key Only)"
),
),
```
---
## Decision Log
| Date | Decision | Rationale |
|------|----------|-----------|
| 2025-11-28 | Implemented Modified Option A | Minimal changes, high impact on discoverability, graceful fallback, user-approved accordion label. | |