frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: How to overcome the limit of roles in LLM's

2•weli•7h ago
Our use case is not uncommon, we are developing tools so that people can install LLM's on their e-commerces.

But there are some interesting challenges that I feel can't be solved unless inference providers allow us to include the concept additional entities in a conversation.

As far as I know the three most basic ones shared alongside all providers are:

- System

- Assistant

- User

That's fine and it allows for simple conversational-based approaches (ChatGPT, Claude, Gemini, etc). However in our use case we allow our customers (not the final user who is talking with the AI) to configure the AI in different ways (personality, RAG, etc), which poses a problem.

If we inject those customer settings in the System prompt then that's a risk because there might be conflicting prompts with our internal rules. So the easiest option is to "clean" the customer prompts before injecting them, but that feels hacky and just adds one more level of indirection. Cleaning the prompt and injecting it with common patterns like XML tags seems to help a bit but still feels extremely risky for some reason.

Injecting it in the assistant or user also seems flaky and prone to prompt injection.

Creating a fake tool call and result like "getPersonalityConfiguration" seems to work the best, from our testing it is treated as something between the System and Assistant roles. And our top system prompt rules are still respected while allowing the customer some freedom to configure the AI.

The problem comes when you need to add more parties to what essentially is a 2 entity conversation. Sometimes we want external agents to chime in a conversation (via subagents or other methods) and there is no good way to do that AFAIK. It gets the occasional confusion and starts mixing up who is who.

One of our typical scenarios that we need to model:

System: Your rules are: You will never use foul language...

Store owner: You are John the customer agent for store Foo...

User: Do you have snowboards in stock?

Assistant->User: Let me check with the team. I'll get back to you soon.

System->Team: User is asking if we have snowboards in stock. Do we?

Team: We do have snowboards in stock.

Team->User: Yes we do have snowboards in stock!

User: Perfect, if I buy them will the courier send it to my country? [country name].

Assistant->User: Let me check, I need to see if our courier can ship a snowboard to your country.

Assistant->Third party logistics: I have a user from [country] interested in buying a snowboard. The dimensions are X by Y and the weight is Z. We would send it from our logistics center located at [address].

Third party logistics -> Assistant: Yes we can do it, it will be 29.99 for the shipping.

Assistant->User: Yes they can ship it to [country] but it does incur in 29.99 extra charge...

I obviated tool calls and responses, but that's basically the gist of it. Spawning sub-agents that have the context of the main conversation works but at some point it is limiting (we need to copy all personality traits and relevant information via summarization or injecting the conversation in a manner that the sub-agent won't get confused). It feels like an anti-pattern and trying to fight the intended use case of LLM's, which seems to be focused in conversation between two entities with the occasional external information going in through System or tool calling.

It would be amazing if we could add custom roles to model messages, still with special cases like agent or assistant.

Has anyone worked with similar problems? How did you solve it? Is this solved in the model lab or at the inference provider level (post-training)?

Ask HN: How can we solve the loneliness epidemic?

330•publicdebates•7h ago•613 comments

Ask HN: One IP, multiple unrealistic locations worldwide hitting my website

28•nacho-daddy•5h ago•14 comments

Ask HN: Share your personal website

830•susam•1d ago•2207 comments

Ask HN: How are you doing RAG locally?

347•tmaly•1d ago•139 comments

Ask HN: What did you find out or explore today?

195•blahaj•1d ago•360 comments

Ask HN: What are your best purchases under $100?

26•krishadi•4h ago•101 comments

Ask HN: Is Codex login down for all workspace (non-personal) users?

2•amluto•1h ago•0 comments

Ask HN: Estimating % of dev using coding assistants

5•japoneris•3h ago•4 comments

Ask HN: Why do AI code editors suck at closing tags?

8•cryptography•17h ago•3 comments

Ask HN: What is the best way to provide continuous context to models?

66•nemath•23h ago•37 comments

Ask HN: How to make spamming us uncomfortable for LinkedIn and friends?

10•zx8080•12h ago•6 comments

Ask HN: What to teach my kid if AI does math and CS?

7•devShark•8h ago•13 comments

Ask HN: How do you safely give LLMs SSH/DB access?

77•nico•1d ago•104 comments

Ask HN: Anyone else finding it impossible to land a job?

12•Arch485•8h ago•17 comments

Ask HN: A pattern we noticed in how website leads are handled

2•lucascorrei4•4h ago•1 comments

Ask HN: Distributed SQL engine for ultra-wide tables

22•synsqlbythesea•1d ago•18 comments

Ask HN: Any real prompt injections in the wild?

6•singularity2001•15h ago•2 comments

Ask HN: Iran's 120h internet shutdown, phones back. How to stay resilient?

112•us321•2d ago•95 comments

Ask HN: Are the layoffs at Tailwind a trend that can be extrapolated?

2•qcardona•1h ago•1 comments

Ask HN: For those of you building AI agents, how have you made them faster?

2•arkmm•5h ago•1 comments

Ask HN: Audio analysis models, how to train to learn sound patters?

4•thedangler•9h ago•1 comments

Where does data help in real estate – and where does it fail?

2•D___R___•6h ago•0 comments

Ask HN: How to overcome the limit of roles in LLM's

2•weli•7h ago•0 comments

Ask HN: Why does Google still provide an open redirect for phishers?

21•throwaway89201•1d ago•9 comments

GitHub Is Down

18•dfajgljsldkjag•7h ago•16 comments

Ask HN: What are you working on? (January 2026)

256•david927•4d ago•867 comments

The $LANG Programming Language

261•dang•2d ago•69 comments

Architecture+cost drivers for a deterministic rule/metric engine 1,200metrics

2•Trackdiver•9h ago•0 comments

Tell HN: 1B Jobs on GitHub Actions

2•dorianmariecom•8h ago•1 comments

Turning weeks of medical device documentation into minutes

2•feargalosull•9h ago•0 comments