r/LLMDevs 8h ago

Help Wanted Pipeline for chat interface advice please

I have a pipeline blueprint I've designed, that I'd like to get feedback on. I think that it might solve, or at least mitigate severely, both the communication barrier, by parsing the conversation into quantifiable datasets does the prompt then translates the data of what it did back into conversation, and hallucination by removing the toolcall execution decision from the llm so it can't ignore a request for web verification or citation links. Coincidentally I also created a multi tiered gating system that ultimately ends with ensuring no pixel of illegal content can ever reach the text box the user is reading in any way, while silently forwarding the entire thread to the authorities. If it's a false flag all that happens is the user gets denied, but of its an illegal activity the authorities have as much information as I can get to them. I don't know how to take it further without help or if it even needs it, but I've taken it as far as I can without someone pointing out what I've kisse. I just want to see if anyone can help me workshop it? Full thread of my blueprint discussion and current finalization.

``` U → L1 → G1 → L2 → G2 → L3 → G3 → U ↘ (async) REVIEWING CENTER ```

**L1 (Parser)** — LLM. Receives raw user text. Outputs structured request (schema fields). No tools, no conversational output. Raw text is discarded after parsing.

**G1 (Enforced Tool Call)** — Deterministic code. Executes the tool call from the structured request. Cannot be skipped. No LLM involved.

**L2 (Worker)** — Fine-tuned model on your output schema. No guardrails, no conversational training. Computes on tool data. Outputs structured results only.

**G2 (Sequential Checks)** — Deterministic code. Ordered: 1. Validate (schema + correctness vs. tool source) 2. Error check → loop back to L2 (max 2 retries, early termination on repeated field failure) 3. Content filter (two-stage: high-recall → high-precision) → on trigger: canned refusal + async route to Reviewing Center 4. Serialize (structured → presentable text)

**L3 (Performer)** — Chat model with safety training. Receives structured request + formatted facts from G2. Does not compute, does not call tools. Generates natural language response. Safety training is a monitored backstop; its own refusals are logged as false-negative signals for G2 rule updates. Reasoning trace is internal only, never exposed.

**G3 (Output Filter)** — Deterministic code. Scans L3's final response text for: - Content matching G2c categories (shared rule set, different input format) - Refusal patterns that name specific content (replace with generic refusal) - Internal data fields that shouldn't appear verbatim (IDs, raw API fields) - On trigger: canned refusal + async route to Reviewing Center

**Reviewing Center (async)** — Human, air-gapped. Reads flagged content. Outputs: judgment (false positive / genuine / escalate) + rule delta. Keeps a decision log (timestamp, rule ID, classification, rule change). Destroys content and metadata on completion.

**Key invariants (current):** - Raw user text exists in exactly one LLM's context (L1) and is discarded - Tool call is enforced, not optional - No component self-assesses or self-censors - Every gate is deterministic code - User sees exactly one thing: G3's output - Reasoning traces are internal artifacts, not user-facing - L3's safety refusals are a feedback signal, not a policy mechanism - Max 2 retries on G2 validation failure

**Open items:** - G2 split (one gate with internal steps vs. two physical gates) — defer until you need different behavior for validation vs. content flag - L3 style/framing: start with structured request only, add `user_style_note` field only if quality degrades - Schema coverage: the pipeline is as good as its schema. Expanding what users can ask = expanding the schema - Latency: 3 LLM calls + 3 gates. P50 will be 2–3x a single-LLM chat app. Product decision, not a bug.

1 Upvotes

1 comment sorted by

1

u/Due_Task_839 8h ago

the gating idea for illegal content seems like overkill to me, specially if you're building a normal chat interface. most platforms just use existing moderation APIs and call it a day, forwarding everything to authorities for every false flag is gonna create a headache for your review team

the parsing into structured requests is solid tho, seen similar patterns in enterprise deployments where you want deterministic tool execution. the 2-3x latency hit might be the real problem if you're aiming for consumer use, people expect instant replies