While working on a food recipe platform built with React and ASP.NET Core Web API, I encountered a common problem: traditional search was not meeting user expectations.
Users rarely search using exact recipe names. Instead, they type natural language queries such as:
"Shahi Paneer recipe for 2 people which I can cook in 10 minutes"
Traditional database searches based on keyword matching struggled to understand these requests, often resulting in poor or no results.
Describe how your original search worked.
Provide examples of searches that failed.
Explain that users think in terms of intent, not database fields.
Example:
User query
"Healthy vegetarian dinner under 500 calories"
The database contains:
But the user's request combines multiple requirements that are difficult to handle with simple keyword searches.
Instead of replacing the existing search system, I enhanced it using the OpenAI API.
The goal was simple:
Convert natural language queries into structured search filters that the database can understand.
User Search Query ↓React Frontend ↓ASP.NET Core Web API ↓OpenAI API(Intent Analysis) ↓Structured JSON Filters ↓SQL Server Search ↓Recipe Results
Discuss:
When a user enters a query, the ASP.NET Core API sends it to OpenAI with a carefully designed prompt.
Example query:
Shahi Paneer recipe for 2 people which I can cook in 10 minutesExample:{ "recipeName": "Shahi Paneer", "ingredients": ["paneer", "onion", "tomato", "cashew"], "tags": ["indian", "curry"], "maxCookingTime": 10, "servings": 2, "calories": null, "dietType": 1}
The application then uses these values to build database filters and return relevant recipes.
Share measurable improvements if possible:
Discuss:
AI-powered search is not just for large platforms. Even a recipe website can benefit significantly from natural language understanding.
By using OpenAI as an intent parser and keeping the existing database search architecture intact, I was able to deliver a more intuitive and user-friendly search experience with minimal disruption to the existing system.
Please try on https://mealformula.com/
Thanks, for reading the blog, I hope it helps you. Please share this link on your social media accounts so that others can read our valuable content. Share your queries with our expert team and get Free Expert Advice for Your Business today.
Hire me on Linkedin
My portfolio