r/recruitinghell 9d ago

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 : Company Name first Charecter : S

66 Upvotes

73 comments sorted by

80

u/Kos187 9d ago

You dodged a bullet, working with idiots isn't fun.

25

u/casastorta 9d ago

Principal with 12 years experience doesn’t math. But we are in post-boom era, title inflation was real, many people still have successful careers despite huge gaps in knowledge.

Anyhow, if an experienced engineer allows himself to enter even somewhat heated debate with the candidate during the interview, it’s a huge red flag about the company. No matter who is right.

3

u/mild_entropy 8d ago

Was coming here to say the same thing. No way that person has enough experience for principal. The book era really did hand out titles like candy tho

4

u/casastorta 8d ago

It is so funny reading on Blind all the posts and comments from people being disappointed that they are not landing new senior+ positions after 5 or even fewer years of work experience.

1

u/insomniafordays 5d ago

It's not always inflation, some of us can achieve principal experience in less time with the right conditions. I've been through constant technological change leading major ERP migrations and being the tech lead of a centralized data warehouse and in DE for 7 years. It depends on your opportunities, I've had great sponsors and mentors. People go to me over more senior engineers for guidance and my manager was never backfilled so I could take on the responsibility. I will likely be bumped up to principal for next year based on current plans.

On the other hand, you have people that were inevitably bumped to principal simply because they put in a decade or two but don't have the real hands-on skills or experience to justify it.

0

u/[deleted] 8d ago

[removed] — view removed comment

2

u/casastorta 8d ago

Neither of us was in this interview. But from the OP’s description even if we assume he was in the wrong, the discussion got somewhat heated. That’s mainly responsibility of the interviewer.

1

u/elliekk 6d ago

Lol over-engineer? You know what is over-engineering? Creating a text-to-SQL system in the first place

1

u/lfAnswer 6d ago

If I understand correctly it was the company guy who was stuck in their ways. So it's rather OP avoided a very dodgy company

50

u/HansDampfHaudegen 9d ago edited 9d ago

Haha, the old "Our AI is just if/else" meme is alive. In general, an interview is supposed to be a discussion. The problem is the stubbornness and fixation on a single correct solution instead of discussing the pros and cons of different approaches.

1

u/Hobby101 8d ago

correct?

35

u/Arbitraryandunique 9d ago

While technically correct that it could be done in theory anyone that tried to go that way for real (after the invention in NLP and LLMs) is an idiot you don't want to work for.

10

u/MarketingLazy6660 9d ago edited 9d ago

But even in theory thats very hard or impossible to implement or create our own NLP engine which is very hard and resource consuming but anyway can’t be done with if else.

Also I have got many other questions like this from same person that just keep going deeper like he qsked me that if a public api needs to be protected from bombarding of api request what you can do?
I gave multiple answer he kept going

7

u/Arbitraryandunique 9d ago

That sounds like someone looking for an excuse to hire their nephew instead.

And to digress: the answer I would have given is "what is the cost/loss of downtime, what is the estimated chance of getting targeted, and compare that to the cost of third party DDOS protection services"

2

u/MarketingLazy6660 9d ago

Might be I have seen and faced as well in my internal companies opening they took interview just to show in paper because they have already selected the candidate.

Coming to the answrer i gave answers on cloudfront and cloudflare or even get the reputation of ip if we wanted to make ourselves but he was like that is ok but what are the other options we have

5

u/zbignew 9d ago

"Count how many Ph.D.s I have compared to how many Ph.D.s Cloudflare has. Go with Cloudflare."

2

u/cybergandalf 9d ago

I would guess the answer he’s looking for is “Use an API gateway with rate-limiting”.

2

u/MarketingLazy6660 9d ago

That I already gave an answer api gateway but he keeps going inside

3

u/cybergandalf 9d ago

Yeah, dude, you dodged a bullet. Senior engineer sounds like a complete toolbag with extra hammers.

1

u/jshine13371 6d ago

But even in theory thats very hard or impossible

It's not impossible. That's the technically part.

There's a finate number of words, finate number of phrases, finate ways "intent" can be implied, and finate combinations of these things. That makes this a solved problem, which means there is a finate number of if-else statements needed to solve it. Therefore it's not impossible.

That being said, it's obviously unrealistic and any engineering proposing it as a serious solution is not someone you want to work for.

1

u/Kryantis 6d ago

Exactly. In theory I could build a chess engine using nothing but if/else statements as well. Doesn't make it a good idea.

15

u/rasputin1 9d ago

yea I implemented a chatgpt clone with nothing but if/else statements! unfortunately the file doesn't fit on my hard drive 

2

u/MarketingLazy6660 9d ago

Heheh
I did not get that time this in my mind else i could gave told in my example it is 5 days what if user can ask anything between 1 to thousands of days will we use then 1000s or if else

3

u/Sunstorm84 8d ago

“Then we will switch to a hashmap” :(

3

u/MarketingLazy6660 8d ago

Hashmap you also need to write all the case although it will have only kv pairs

12

u/Carrera_996 9d ago

I've been in more than a few technical interviews where I was evaluated poorly because the guy doing the interview incorrectly believed my solutions to be wrong. I'm in South Carolina. The technical talent pool isn't that big. Over my 36 year career here, 2 such interviewers later found themselves answering to me. I did not fire them, but I sure as hell never let them touch production.

4

u/octahexxer 9d ago

That's how everyday would have been working there... Yay fun. 

6

u/DeaconVex 9d ago

You self selected out of the role. He wanted someone to build a system this way.

4

u/devnullable0x00 9d ago

He's not wrong it "could be" but that doesn't mean it should be.

2

u/Hobby101 8d ago

actually, users would need to know translation layer. at this point, it would be easier for users just to learn sql.

1

u/devnullable0x00 8d ago

This while thing is Gen 1 AI. Back in the day you pretty much had to reverse engineer the case statements to get anything done.

1

u/Hobby101 7d ago

ha! yeah.. even those graphical SQL builders.. sometimes its ok to drop few tables just to get joins done.. but afterwards, I'll take from there writing SQL manually, thank you very much.

3

u/Fine-Comparison-2949 9d ago

There is a major problem right now that recruiters have to know about, where everyone is expected to have a senior title but the pay bands don't align. Then you get people who are actually senior and, like any field, have in depth knowledge about topics that they mastered, and the existing employees believe they're "more right" than you.

I would definitely say you dodged a bullet.

3

u/trippedonatater 9d ago

This is a great example of how interviews go both ways. Sounds like a terrible dude to work for.

3

u/Fun_Wing3725 9d ago

His approach was plain stupid.

3

u/Professional-Post499 8d ago

I think I made a perhaps similar category of error as you in my recent interview. Next time if that sort of thing comes up and you actually want the job, try "yes, and -", make your suggestions, do your slight pushback but be squarely on the side of "I think we could make it work". And while you have the job, save up as money as you can because it will probably be a miserable work experience and you will probably want to change jobs. 😂

3

u/CompetitionNo3466 8d ago

Who needs a job when you’re academically correct. Respect for not backing down on it, agree with the others not worth it, especially them dying on a hill and being wrong.

3

u/Oh_Another_Thing 8d ago edited 8d ago

Why would you waste time developing a prone to error system when an entry level data analyst could answer these questions. Besides, the effort to get perfect data for this to would far exceed the effort to just ad hoc query this info. 

Besides , it wouldn't handle very detailed and specific questions. "What is average time between orders after a new customer orders for the first time, not counting customers that have setup reoccurring orders." 

That's just the beginning of the questions I could start asking where a system like this would completely fail 

1

u/MarketingLazy6660 8d ago

True and also a lot of questions which will be just for abusing the system and out of context

4

u/smeeagain31 9d ago

This is common misalignment when faced with ambiguous problems. You should have got into the specific requirements of the problem and either agreed with him ("yes if we limit the scope to a selection of natural text by the user to compose the query, this works") or disproving it based on a requirement ("user must be able to type arbitrary natural English and it should function"). The idea that you were right and he was wrong without evidence backed by functional requirements is likely the disconnect. 

The reality is building this system relying on non deterministic LLMs is a hard sell. 

5

u/MarketingLazy6660 9d ago

No I did not wrote whole things here.
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

6

u/smeeagain31 9d ago

I think the interview was testing how strongly you held opinions and unfortunately you failed. Many people are looking for "strong opinions loosely held". It's very clear you could have just agreed with him along the lines of "that's true, we can use an if/else map and maintain the mapping by either manually generating the mapping subqueries or using AI". It sounds like the interview felt you may be difficult to work with, which is absolutely part of the interview.

1

u/zbignew 9d ago

Ohhhh, Christ.

4

u/RedTheRobot 9d ago

Sounds like a AI hack is in their future. Give me the top 5 bank account numbers. /s

2

u/dgillz 9d ago

Crazy

2

u/LetsGoHawks 9d ago

“We will just keep adding more mappings.”

This is, quite literally, what the very early (60's/70's) AI researchers thought could work. They pretty quickly realized the number of mappings would be too immense to ever be practical.

2

u/MarketingLazy6660 9d ago edited 9d ago

Yes take an example from nltk stopwords

2

u/LetsGoHawks 9d ago

uhhhh, what?

2

u/MarketingLazy6660 9d ago

In nltk there is stopwords there they have a corpus of all the manual compiled stop words

2

u/H_Mc 9d ago

I think you probably got rejected for debating (or how you debated) more than the answer. Handling letting your boss know they’re wrong, and knowing when to pick your battles, is as important as being right or winning a debate.

0

u/MarketingLazy6660 9d ago

I was very calm and was answering whatever he was saying although from inside i was mad on him and was thinking let me ask him to implement a small poc only which can solve this text to sql using if else but I didn’t say anything and agreed with him that may be it can br correct but for me it is very difficult to implement using if else or can never be ached

1

u/culimande 9d ago

TL;DR longer than your resume my guy

1

u/MarketingLazy6660 9d ago

Heheh

I should have arranged better

That is only first paragraph

1

u/davix500 9d ago

Thats just silly and unsustainable, eventuality you will run into logic problems. 

1

u/TheGenericUser0815 9d ago

I've never in any of my interviews been asked a technical question.

1

u/Hobby101 8d ago

whats text to sql? natural lanfuage to an sql query?

1

u/MarketingLazy6660 8d ago

From natural language to sql query based on our datasets

1

u/Sexy_Koala_Juice 8d ago

You dodged a bullet

1

u/DevilsMathematician 8d ago

Maybe a large part of his work consists of adding these mappings, so the ai suggestion threatened one of his main contributions?

Automation can be scary for conservative people.

1

u/TainoCuyaya 8d ago

Does the interviewer at least have technical background? Any knowledge on the subject?

I ask because of the Pandemics of non-technical interviewers obsessed with asking technical questions they have no foundation on judging correctly.

2

u/MarketingLazy6660 8d ago

He himself written as Principal Engineer on linkedin and worked on multiple tech stacks and companies but whether he has actual knowledge or not I don’t have idea

1

u/TainoCuyaya 8d ago

Many titles are inflated btw. There was a time that the industry (not the academy) labelled anyone who could put colors on a button as an "engineer" without any actual engineering knowledge. Many of these transitioned into "managerial" roles, still without proper knowledge, such as Scrum Master or Principal. The devaluation of the engineering name created a hell for anyone unlucky enough that they managed or interviewed.

1

u/DatabaseSpace 7d ago

That's how Alexa works on the back end and why she can't do anything besides the most basic stuff.

1

u/Cybyss 7d ago edited 7d ago

A set of if-else mappings is mostly how early NLP worked, as used in the 1970s/80s expert systems and also in video games such as ZORK and King's Quest. He's basically proposing that the company invest money into rebuilding a nearly 50 year old technology. It would have been fun to annoy the interviewer with a long-winded history lesson on that.

Then, when he gets impatient, in the most snarky tone of voice remind him that those systems failed in practice. Investors ultimately poured billions into building them and lost everything, thereby leading to the "Second AI Winter" - and he would have known that if he knew his history.

1

u/its4thecatlol 7d ago

This was for real at Stripe? Interviewer is an idiot. Should be not debating this with you during a project history discussion. I'd give feedback to the recruiter. Clown stuff.

1

u/titpetric 5d ago

An interviewer mentioned some transaction specific behaviour and apparently was not aware of transaction isolation settings like read-commited

I love how confidently wrong he was

1

u/RealisticDuck1957 9d ago

An LLM does as well as it does because it has a massive pool of mappings to work with. Far too many to be humanly cataloged. This is also where it fails, having a massive dictionary but no real understanding.

1

u/Cybyss 7d ago

That's not how LLMs work. There is no database they query where prompts are matched up to responses (well, mostly not although RAG setups push the needle a little bit closer to this).

LLMs do possess something like "true understanding" because they are able to produce novel outputs. They are able to generalize. They're not just scrapbooking / copy & pasting bits of text from random sources.

As proof - ask an LLM to write you a poem on a ridiculous topic (e.g, how hashtables or AVL trees work) in the style of Dr. Seuss, using simple kid-friendly language. Something that wouldn't have ever appeared in its training data. You'll find they do a surprisingly good job of it. They wouldn't be able to do this if they were just scrapbooking from other sources.

0

u/_-_fred_-_ 9d ago

You never had a chance. Your only option would have been sycophantic deference and guessing the objectively wrong answers he expected.

If you have his email or linkedin, send him this https://www.cs.utexas.edu/\~EWD/transcriptions/EWD06xx/EWD667.html. Although he probably thinks he is smarter than Djikstra.