Ask the agent
This agent is a simulation, part of a made-up example. It matches your words, in your browser, against a list of pre-written questions and answers, then fills in the homes' details, their simulated availability and invented prices, and the live forecast, warnings, sea, UV and events for the dates you give. There is no live model behind it.
How it works
- Matching. Your question is turned to plain lower-case letters (accents removed), then compared with each pre-written question's patterns in a fixed order; the first that matches answers. Home names, towns and dates such as "tomorrow", "this weekend", "next week" or "21 to 28 November" are picked out first, and kept for your next question.
- Live figures. Forecasts, warnings, sea and UV are IPMA's, and events come from each town's agenda, read in your browser from data.promptugal.news. Every live answer ends with its source and the time it was read.
- Invented things. The company, the homes, their prices and their availability are made up for this example. Nothing can be booked.
- Nothing kept. What you type stays in this page's memory and is gone when you leave. You can link to a question: /agent/?q=What is the weather in Sagres this week?
The pre-written answers were written by the team's writer and are in agent-script.js; the matching is in agent.js.