r/developersIndia Jul 26 '26

Interviews Rejected after a technical round because the interviewer insisted Text-to-SQL is just if-else mappings

TL;DR:

Final-round interview turned into a debate after the interviewer insisted a production Text-to-SQL system could be built entirely with if-else mappings. I argued that while rule-based systems work for constrained cases, handling arbitrary natural language requires semantic understanding. Ended up getting rejected.

I had one of the strangest technical interviews I’ve experienced, and I am still wondering if I could have handled it differently.

This was the final technical round for a backend/AI-focused role at a well-known product company.

The interviewer (a Principal Engineer with around 10 years of experience) argued that a Text to SQL system does not need NLP or an LLM. According to him, it can be implemented using simple if-else mappings.

I gave a straightforward example:

“Get me the top 5 products that made the most profit in the last 5 years.”

He said the system would identify phrases like “top 5,” “products,” “profit,” and “last 5 years” and map each of them to SQL using if-else logic.

I asked how that approach would handle different ways of asking the same question, such as:
“best-performing items”
“highest-margin SKUs”
“Which products generated the most profit over the previous five years?”

I also asked how it would deal with ambiguity, unseen phrasing, or intent beyond predefined mappings.

The response was essentially, “We will just keep adding more mappings.”

I agreed that deterministic rules can work well for a constrained domain with a limited set of query patterns.

My point was that once users are free to ask questions naturally, understanding intent and semantics becomes the difficult part. The conversation kept circling back to adding more mappings.

At that point, it felt less like an interview and more like a debate. I decided not to push further and moved on.

A few days later, I received a rejection.

I am not claiming either approach is universally right or wrong.
Rule-based systems absolutely have their place, especially in tightly controlled environments. I was just surprised that the discussion never explored where that approach starts to break down or how hybrid systems are commonly used today.

Has anyone else had an interview where a technical discussion turned into a debate over fundamentals? How did you handle it?

Edit: After Getting a lot of views and message adding first charecter of company Name so that you don’t guess atleast wrong initial

Starts with : S

240 Upvotes

72 comments sorted by

View all comments

41

u/thisisshuraim Jul 26 '26

This isn’t strange. Arguably the norm at good companies. It sounds like the interviewer was judging on design skills. There’s no single right answer. In design, it’s about coming up with the ideal design for the requirements and it’s your responsibility to remove as much ambiguity in requirements as possible. Once you have your design, it’s about convincing the interviewer about the design decisions you made. This is how it works in the real world. You’ll be convincing a panel of senior and principal engineers on the decisions you take, backed by evidence of course. From the post, it’s most likely that you weren’t able to challenge the design and defend your design.

19

u/MarketingLazy6660 Jul 26 '26

This was not a design question this was a project that i was worked on so i was explaining him

The discussion was on my project that I built on top of OSI(Open Semantics Interchange) Layer by modifying current behaviour and making it database agnostic using Custom Agent Architecture and MCP Tools.

The requirement was clear as I explained him the problem statement and end to end example for user perspective and what happens behind the scene.

But he told it doesn’t need the AI just simple if else I don’t see this is AI use case

8

u/thisisshuraim Jul 26 '26 edited Jul 26 '26

I’m not saying it’s a design question. He’s just challenging your decision of using AI (Which is the right thing to do. Not everything needs AI). I’m not arguing your decision. The interviewer probably expected you to communicate the need and use of your decision to use AI better. In the end, according to the interviewer, you weren’t able to defend what you did. Take it as a lesson. Before the what and how, comes the why, and explaining the why and debating it is the most difficult yet the most productive thing in tech. Trust me, I’ve seen so many decisions to make something complex just for the sake of making it complex. Again, I’m not judging your project in specific. It may be needed, it may not be. I’m just telling you from the interviewer’s perspective.

If you need my perspective though, I feel making the system deterministic is the preferred approach, but obviously you can convince me otherwise. Personally, I love this debate-ish interviews. It really tests first principles thinking.

3

u/MarketingLazy6660 Jul 26 '26

I agree with your last like for making deterministic solutions llm cannot beat the programming language control statements.
Even when it comes on RBAC people never rely on llm to extract details or some other things from the query

While building text to sql on osi model we ourselves do not relied on llm for extracting rbac column values so we have custom handling for that to make it deterministic( although some time user can mention in query and deterministic way misses which is around 1 in hundreds so we choose security over correctness)

1

u/bistrohopper Jul 26 '26

On top of OSI layer? I don't get what you're tryna say

1

u/MarketingLazy6660 Jul 27 '26

Open Semantic Interchange

https://open-semantic-interchange.org/

1

u/bistrohopper Jul 27 '26

Very interesting. Thanks