Natural Query Engine (NQE)
The Natural Query Engine (NQE) is Conduit's interface for querying industrial data using constrained natural language. Unlike general-purpose AI assistants, NQE uses a deterministic grammar that ensures predictable, reproducible query compilation.
Design Philosophy
Why Not Full Natural Language?
Full natural language understanding (like ChatGPT) is powerful but unpredictable. When you ask "show me temperature data," a general AI might interpret this dozens of different ways. In industrial contexts, reproducibility matters. The same question should always produce the same query.
AI-Assisted Query Generation
NQE uses AI-assisted query generation that:
- Interprets your natural language questions
- Generates structured queries for your review
- Validates against your actual tag catalog
- Provides confidence scores and alternatives when ambiguous
This means you get the convenience of natural language with full control over what executes. You always review and can adjust queries before they run.
Query Structure
NQE queries follow a consistent pattern:
[Action] [Measure] for [Subject] [Time Range] [Filters]
Actions
| Action | Description | Example | |--------|-------------|---------| | Show | Display current or historical values | "Show temperature..." | | What is | Get current value | "What is the pressure..." | | Compare | Side-by-side comparison | "Compare temperatures..." | | Trend | Time-series visualization | "Trend flow rate..." | | Alert | When values crossed thresholds | "Alert when temperature..." | | Correlate | Cross-source relationships | "Correlate pressure with..." |
Measures
Measures are the values you want to retrieve. NQE supports:
- Tag names: Direct references like "Tank1_Temperature"
- Semantic terms: "temperature," "pressure," "flow rate"
- Calculated values: "average," "maximum," "rate of change"
Subjects
Subjects identify what equipment or area you're asking about:
- Equipment: "Tank 1," "Pump 23," "Line 4"
- Areas: "Building A," "Zone 3," "Production floor"
- Systems: "HVAC," "Cooling system," "Main process"
Time Ranges
| Format | Example | |--------|---------| | Relative | "last hour," "past 24 hours," "yesterday" | | Absolute | "from 8am to 5pm," "January 15th" | | Range | "between 6am and noon" | | Current | "now," "current" |
Query Examples
Basic Queries
What is the current temperature of Tank 1?
AI generates NQE:
Show current value for Tank1_Temperature
You review and confirm, then results are returned.
Show pressure readings for Pump 23 over the last hour
AI generates NQE:
Show value by timestamp during last 1 hour, where tag is Pump23_Pressure
You review and confirm, then query executes against your historian.
Aggregation Queries
What was the average flow rate for Line 4 yesterday?
AI generates NQE:
Show average flow_rate during yesterday, where line is Line 4
Show minimum and maximum temperatures for all tanks last week
AI generates NQE:
Show minimum temperature and maximum temperature by tank during last 7 days
Cross-Source Queries
Correlate cooling water temperature with compressor vibration over the last 24 hours
This query spans multiple data sources. Conduit automatically:
- Identifies relevant sources (Ignition for cooling water, PI for vibration)
- Queries each source in parallel
- Time-aligns and correlates the results
AI generates NQE:
Show temperature and vibration by time during last 24 hours,
where equipment is CoolingWater and Compressor
Alert Queries
When did temperature exceed 180°F for Tank 1 this month?
AI generates NQE:
Show timestamp and value during last 30 days,
where tag is Tank1_Temperature and value > 180
Semantic Resolution
When you use semantic terms like "temperature" instead of exact tag names, NQE performs semantic resolution:
Resolution Process
- Vector Search: Find tags with similar semantic meaning
- Context Matching: Filter by subject (equipment/area)
- Ranked Results: Return top matches with confidence scores
- Disambiguation: If ambiguous, prompt for clarification
Example
Query: "Show temperature for Tank 1"
NQE finds these candidate tags:
| Tag | Score | Source | |-----|-------|--------| | Tank1_Temperature | 0.95 | Ignition | | Tank1_TempProbe_1 | 0.87 | OPC-UA | | Tank1_Temp_Ambient | 0.72 | Modbus |
If the top match is above the confidence threshold (default: 0.85), it's selected automatically. Otherwise, NQE presents options:
Multiple temperature tags found for Tank 1:
1. Tank1_Temperature (Process temperature)
2. Tank1_TempProbe_1 (Inline probe)
3. Tank1_Temp_Ambient (Ambient temperature)
Which would you like?
Voice Interface
NQE is designed for voice-first interaction. Operators can ask questions hands-free while working on the plant floor.
Voice Query Tips
- Speak naturally - NQE handles filler words and hesitations
- Use equipment names as they appear on your HMI
- Time ranges can be conversational: "this morning," "since lunch"
Voice Response
Results are spoken back in natural language:
Query: "What is the temperature of Tank 1?" Response: "Tank 1 temperature is currently 145 degrees Fahrenheit."
Validation & Error Handling
Validation Steps
- Syntax Check: Query follows valid NQE grammar
- Catalog Check: Referenced tags/equipment exist
- Permission Check: User has access to requested data
- Feasibility Check: Query can be executed (e.g., time range is valid)
Common Errors
| Error | Cause | Solution | |-------|-------|----------| | "Unknown equipment" | Subject not in catalog | Check equipment name spelling | | "Ambiguous tag" | Multiple matches, none high-confidence | Be more specific or select from options | | "No data available" | Tag exists but no data in range | Expand time range or check source | | "Permission denied" | User lacks access | Contact administrator |
Query History & Favorites
NQE maintains a history of your queries:
- Recent Queries: Quick access to repeat queries
- Favorites: Save frequently-used queries
- Shared Queries: Share useful queries with team members
Parameterized Queries
Save queries with parameters for reuse:
Show {{measure}} for {{equipment}} over the last {{duration}}
Then invoke with:
Run saved query "equipment-check" with Tank 1, temperature, 1 hour
Best Practices
Be Specific
❌ "Show me the data" ✅ "Show temperature for Tank 1 over the last hour"
Use Equipment Names
❌ "What's the temp over there?" ✅ "What is the temperature of Reactor 3?"
Specify Time Ranges
❌ "Show pressure history" ✅ "Show pressure for Pump 12 over the last 24 hours"
Use Aggregations for Large Ranges
❌ "Show all temperatures for the last month" ✅ "Show daily average temperatures for the last month"
Next Steps
- API Reference - Use NQE programmatically
- Architecture - How NQE fits into Conduit
- Adapters - Configure data source connections