Skip to content

Commit 8259695

Browse files
committed
Updated docs for recent updates
1 parent 1bd5da3 commit 8259695

File tree

3 files changed

+97
-6
lines changed

3 files changed

+97
-6
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,15 @@ app.MapNLWebNet(); // Map NLWebNet minimal API endpoints
224224

225225
5. **Test the demo features**
226226
- **Home Page**: Overview and navigation to demo features
227-
- **Interactive Demo** (`/nlweb`): UI for testing NLWeb queries
228-
- Query input with natural language questions
229-
- Mode selection (List, Summarize, Generate)
230-
- Streaming responses with real-time display
231-
- API testing interface
227+
- **Interactive Demo** (`/nlweb`): UI for testing NLWeb queries with enhanced data source visualization
228+
- **Smart Data Source Management**: Automatic routing between RSS feeds (.NET content), Schema.org static data (science fiction), and mock placeholders
229+
- **Visual Data Source Indicators**: Top-level Bootstrap cards showing which sources are active
230+
- **User Guidance Prompts**: Contextual examples of what content is available to search
231+
- **Query input with natural language questions**: Try ".NET 9 features" for RSS data or "space movies" for sci-fi content
232+
- **Mode selection**: List, Summarize, Generate modes with streaming support
233+
- **Color-coded result badges**: Each result shows its source (RSS/Schema.org/Mock) with visual indicators
234+
- **HTML tag removal**: Clean display of RSS feed content
235+
- **API testing interface**: Direct endpoint testing with request/response inspection
232236
- **API Documentation**: OpenAPI specification for `/ask` and `/mcp` endpoints
233237

234238
> **🔧 Real AI Integration**: The demo uses mock responses by default. For actual AI-powered responses, see the [Complete Setup Guide](doc/demo-setup-guide.md) for Azure OpenAI and OpenAI API integration.
@@ -337,13 +341,14 @@ The demo application works with mock responses by default, but can be configured
337341
📖 **[Complete AI Integration Guide](doc/demo-setup-guide.md)** - Step-by-step instructions for:
338342

339343
- Azure OpenAI and OpenAI API configuration
344+
- Enhanced data source features and testing scenarios
340345
- Security best practices for API key management
341346
- Service registration and dependency injection
342347
- Troubleshooting common setup issues
343348
- Configuration options
344349
- Production deployment considerations
345350

346-
The guide includes examples, FAQ, and troubleshooting to get you up and running with AI responses.
351+
The guide includes examples, FAQ, troubleshooting, and detailed documentation of the enhanced data source visualization features.
347352

348353
## ⚙️ Configuration
349354

doc/demo-setup-guide.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This guide provides step-by-step instructions for configuring and testing the NL
66
77
## Table of Contents
88

9+
- [Enhanced Data Source Features](#enhanced-data-source-features)
910
- [Prerequisites](#prerequisites)
1011
- [Option 1: Azure OpenAI Setup (Recommended)](#option-1-azure-openai-setup-recommended)
1112
- [Option 2: OpenAI API Setup](#option-2-openai-api-setup)
@@ -20,6 +21,51 @@ This guide provides step-by-step instructions for configuring and testing the NL
2021
- [Production Deployment Notes](#production-deployment-notes)
2122
- [Frequently Asked Questions](#frequently-asked-questions)
2223

24+
## Enhanced Data Source Features
25+
26+
The NLWebNet demo application includes sophisticated data source management with strict isolation and visual indicators:
27+
28+
### 🎯 **Smart Data Source Routing**
29+
30+
The demo uses an **Enhanced Mock Data Backend** that intelligently routes queries to different data sources based on LLM availability and query content:
31+
32+
- **When LLM is configured**:
33+
- **.NET queries** (containing ".NET", "release", "update", etc.) → **RSS feed data** from Microsoft .NET Blog
34+
- **General queries** (space, movies, AI, etc.) → **Static science fiction content** with Schema.org markup
35+
- **When LLM is not configured**:
36+
- **All queries****Mock placeholder data** for demonstration
37+
38+
### 🎨 **Visual Data Source Indicators**
39+
40+
The demo UI features prominent Bootstrap cards at the top of results showing:
41+
42+
- **🔵 RSS Feeds**: Live .NET blog content (blue primary theme)
43+
- **🟢 Schema.org Static Data**: Science fiction content (info blue theme)
44+
- **🟡 Mock Data**: Placeholder content (warning yellow theme)
45+
46+
Each indicator shows the count of results from that source and is highlighted when active.
47+
48+
### 🏷️ **Result Source Labels**
49+
50+
Every search result includes color-coded badges showing its data source:
51+
- **RSS badge** (blue): Live RSS feed content
52+
- **Schema.org badge** (info blue): Static structured data
53+
- **Mock badge** (yellow): Placeholder content
54+
55+
### 🧹 **Clean Content Display**
56+
57+
- **HTML Tag Removal**: RSS feed content automatically strips HTML tags for clean display
58+
- **Zero Cross-Contamination**: Robust backend logic ensures no mixing of data sources
59+
- **Science Fiction Theme**: Static content features movies, spacecraft, exoplanets, and futuristic technology
60+
61+
### 💡 **User Guidance**
62+
63+
When AI is configured, the demo shows helpful prompts with examples:
64+
- **".NET Content"**: Try ".NET 9", "ASP.NET updates", "C# features"
65+
- **"Science Fiction"**: Try "space movies", "Mars exploration", "AI stories"
66+
67+
This design helps users understand what content is available and demonstrates clean data source separation for NLWeb protocol implementation.
68+
2369
## Prerequisites
2470

2571
- .NET 9 SDK installed
@@ -227,6 +273,36 @@ Since NLWebNet uses `Microsoft.Extensions.AI`, you need to install the appropria
227273
- Click "Submit Query"
228274
- **Expected**: Full AI-generated response with citations
229275

276+
### Enhanced Data Source Testing
277+
278+
The demo features sophisticated data source management. Test these scenarios to see the intelligent routing:
279+
280+
1. **Test .NET Content Routing**:
281+
- Enter queries: ".NET 9 features", "ASP.NET updates", "C# release notes"
282+
- **Expected**: Results show RSS badges and come from devblogs.microsoft.com
283+
- **Visual**: Top data source card shows "Live RSS Feeds" as active (blue highlight)
284+
- **Note**: HTML tags are automatically stripped from RSS content for clean display
285+
286+
2. **Test Science Fiction Content Routing**:
287+
- Enter queries: "space movies", "Mars exploration", "AI stories", "exoplanets"
288+
- **Expected**: Results show Schema.org badges with sci-fi themed content
289+
- **Visual**: Top data source card shows "Schema.org Static Data" as active (info blue highlight)
290+
- **Content**: Movies like Blade Runner 2049, spacecraft like Millennium Falcon, etc.
291+
292+
3. **Test Mock Data Mode** (AI not configured):
293+
- If no AI is configured, any query returns mock placeholder data
294+
- **Expected**: Results show Mock badges with placeholder content
295+
- **Visual**: Top data source card shows "Mock Data" as active (warning yellow highlight)
296+
297+
4. **Verify Data Source Isolation**:
298+
- Check that .NET queries never show sci-fi content
299+
- Check that general queries never show RSS feed content
300+
- Each result card shows the correct color-coded badge (RSS/Schema.org/Mock)
301+
302+
5. **Test User Guidance Prompts**:
303+
- When AI is configured, see helpful example prompts above the query box
304+
- Examples show what content is available for .NET vs Science Fiction queries
305+
230306
### Streaming Testing
231307

232308
1. **Go to Streaming Tab**:

doc/todo.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ The NLWebNet library is now fully functional and feature complete with a modern
8181

8282
**📚 DOCUMENTATION MILESTONE: Complete Setup Guide** - Comprehensive demo setup guide (`doc/demo-setup-guide.md`) provides end-to-end instructions for integrating real AI services (Azure OpenAI, OpenAI API) with detailed troubleshooting, security considerations, and production deployment guidance.
8383

84+
**🎨 UI/UX ENHANCEMENT: Advanced Data Source Visualization** - Enhanced demo application with sophisticated data source management and visualization:
85+
-**Enhanced Mock Data Backend**: Implemented strict data source isolation with `EnhancedMockDataBackend` service
86+
-**Data Source Indicators**: Top-level Bootstrap cards showing RSS feeds, Schema.org static data, and mock data sources
87+
-**Smart Content Routing**: .NET queries return RSS feed data, general queries return science fiction content, no AI returns mock data
88+
-**HTML Tag Removal**: Automatic HTML stripping for RSS content display
89+
-**Visual Data Source Labels**: Color-coded badges on each result showing source (RSS/Schema.org/Mock)
90+
-**User Guidance Prompts**: Contextual examples showing users what content is available for search
91+
-**Zero Cross-Contamination**: Robust logging and detection to ensure pure data source isolation
92+
-**Science Fiction Theme**: Complete replacement of Microsoft product references with sci-fi content for clean demo data
93+
8494
**The project has successfully completed all planned phases** with a fully functional demonstration application running at `http://localhost:5037`, a published NuGet package available at [nuget.org/packages/NLWebNet](https://www.nuget.org/packages/NLWebNet/), confirmed extension method accessibility, comprehensive configuration and testing infrastructure, and complete documentation for real-world AI integration.
8595

8696
## Implementation Plan

0 commit comments

Comments
 (0)