Replies: 1 comment 2 replies
|
A nice touch to elevate the product. I would look into third-party packages that could make the implementation easier when the time comes. |
2 replies
Sign in
to join this conversation on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Idea
A chat box where users ask questions in plain language, such as "Find the most recent sighting in Oslo" or "How many triangle sightings in Texas?". It answers with matching sightings and links to the detail pages.
How it works
No LLM. A pure function parseQuestion(text) picks out known cities, states, shapes, years and keywords like "latest", "oldest" and "longest". It turns them into the same filters the normal search uses. The backend then runs the existing search. If nothing is recognized, the bot suggests how to phrase a question.
Constraints
Only start after the GraphQL search is done.
No new dependencies, no API keys.
Unit-test the parser with Vitest.
It works like a smart search box, not a real conversation. We should say so in the documentation.
All reactions