Overhaul extraction pipeline with new TradeItem model, conversation flow, and dedicated extraction endpoint. Add sidebar navigation with NavMenu component and landing page. Introduce few-shot prompting service and tests. Add prompt settings and email upload specs. Update OpenSpec tooling with improved export-spec and extract-feature commands. Archive completed changes and export full specs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.0 KiB
2.0 KiB
Why
When testing and debugging the AI chat agent, the system prompt and model parameters (temperature, top-p, max tokens) are hardcoded or absent. Exposing these in the UI lets the developer iterate on prompt engineering without restarting the server, and makes the app useful as a prompt testing workbench.
What Changes
Phase 1: Expose system prompt and model parameters
- Add tabbed UI to the chat page: Chat tab (existing conversation), System Prompt tab (editable text area), Model Settings tab (temperature, top-p, max tokens sliders/inputs)
- Extend the API contract:
ChatRequestgains optionalSystemPromptandModelSettingsfields - Backend applies the system prompt as the first message in ChatHistory and passes model settings to execution settings
Phase 2: Prompt templates with few-shot examples (future)
- System prompt becomes a template with placeholder variables
- UI for adding few-shot input/output example pairs
- Template engine generates the final system prompt from template + examples
- Phase 2 is scoped but NOT implemented in this change
Capabilities
New Capabilities
prompt-settings-ui: Tabbed interface for system prompt editing and model parameter controlsprompt-settings-api: API contract extensions for system prompt and model parameters
Modified Capabilities
chat-ui: Chat page changes from single-panel to tabbed layoutchat-streaming: API accepts optional system prompt and model settings in the request
Impact
- ChatRequest.cs (Shared): Add
SystemPromptandModelSettingsproperties - New ModelSettings.cs (Shared): Temperature, TopP, MaxTokens model
- ChatController.cs (API): Apply system prompt to ChatHistory, pass model settings to execution settings
- Chat.razor (Client): Wrap in MudTabs, add System Prompt and Model Settings tab panels
- ChatApiClient.cs (Client): Pass new fields in requests
- No new packages — MudTabs, MudTextField, MudSlider are all part of MudBlazor