System and method for flowchart-guided dialogue leveraging large language models
AssigneeOpenstream Inc.
InventorsRajasekhar Tumuluri, Zhuang Li, Fatemeh Shiri, Ghlolamreza Haffari
Life of this patent
Estimating the term…
Abstract
A system and method for improving the performance of large language models (LLMs) in conducting flowchart-guided dialogues. Flowcharts are integrated into a dialogue generation process, enabling the LLM to handle both structured and unstructured conversations more effectively. The dialogue system can handle user digressions from predefined dialogue paths (termed “happy paths”), where users may skip steps or switch topics during a conversation.
Claims17
A computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform a method for generating synthetic dialogues and flowcharts for multi-turn conversations, comprising:
- integrating flowchart-based dialogue structures into a large language model training process by including flowcharts in a prompt to instruct the large language model on governing dialogues between a system and a user based on the flowchart;
- generating synthetic flowcharts by prompting the large language model to create flowcharts structured as directed acyclic graphs with nodes representing system questions and edges representing user responses, each flowchart corresponding to a specific task scenario;
- post-processing generated synthetic flowcharts to reduce noise and fix structural issues, ensuring a quality and usability of the synthetic flowcharts in training;
- using the synthetic flowcharts to generate dialogues for happy paths and unhappy paths, enabling the system to handle deviations from one or more predefined dialogue flows;
- and
- enhancing common sense reasoning and decision-making capabilities in the large language model to manage multi-turn conversations by using one or more real and synthetic flowchart-based dialogues.
A method for improving large language models in conducting multi-turn dialogues based on flowcharts, the method comprising:
- synthesizing flowcharts by prompting a large language model to generate directed acyclic graphs with nodes representing system questions and edges representing user responses, covering diverse domains and task scenarios;
- enhancing a diversity of training data by generating synthetic flowcharts across multiple domains and refining them to ensure quality;
- using generated flowcharts to simulate happy paths and unhappy paths in dialogue, where the happy paths represent ideal, sequential dialogue flows and the unhappy paths simulate real-world deviations such as skipping steps or jumping between flowcharts or between nodes of flowcharts;
- and
- fine-tuning the large language model to manage both the happy paths and the unhappy paths based on flowchart structures, improving an ability to handle complex, real-world conversations.
A dialogue system comprising:
- a flowchart generation engine configured to synthesize flowcharts by prompting a large language model and apply post-processing to ensure a quality of generated flowcharts before use in training and dialogue generation, where synthetic flowcharts are generated as directed acyclic graphs representing dialogue structures across a plurality of domains and task scenarios;
- a large language model trained using both real and the synthetic flowcharts;
- and
- a dialogue manager configured to:
- detect user deviations from predefined happy paths and adapting a conversation by either skipping steps or switching between or within flowcharts, depending on a user's intention;
- and
- leverage domain-specific logic to guide transitions between flowcharts or skipped steps, ensuring smooth and contextually appropriate conversations in real-world scenarios.
A method for training a flowchart-guided dialogue system, the method comprising:
- generating synthetic flowcharts by prompting a large language model to create directed acyclic graphs where nodes represent system actions and edges represent user responses, ensuring diversity by covering a wide range of domains and task scenarios;
- refining the synthetic flowcharts by removing noise and fixing structural issues, and discarding and regenerating flowcharts when necessary;
- generating dialogues using refined synthetic flowcharts that cover both happy paths for sequential and ideal conversations and unhappy paths for conversations where users deviate from a predefined sequence;
- and
- training the large language model using real and synthetic dialogues to enhance an ability of the large language model to manage multi-turn conversations, handling both structured and unstructured dialogue flows.
A computer-implemented method for managing deviations from flowchart-guided dialogues, the method comprising:
- detecting when a user deviates from a happy path by either skipping steps within a current flowchart or jumping to a different flowchart entirely;
- determining an appropriate next step using domain-specific logic, either continuing a conversation in a current flowchart or transitioning to a new flowchart based on a user's intention;
- and
- generating responses using a large language model by maintaining coherent and contextually appropriate dialogues despite deviations, using both common sense reasoning and flowchart-based constraints.
A system for generating synthetic dialogues and flowcharts for multi-turn conversations, comprising:
- a processor;
- and
- a non-transitory computer-readable storage medium storing instructions that, when executed by the processor, cause the system to:
- generate flowchart-based dialogue structures by prompting a large language model;
- synthesize flowcharts as directed acyclic graphs with decision nodes and user response edges;
- generate dialogues for happy paths and unhappy paths, wherein the system handles deviations by allowing skipping of nodes or switching between flowcharts;
- and
- fine-tune the large language model to manage both structured and unstructured dialogue flows.
A system for training a large language model to conduct flowchart-guided dialogues, comprising:
- a flowchart generation engine configured to synthesize flowcharts as directed acyclic graphs for diverse task scenarios;
- a post-processing engine configured to refine synthetic flowcharts to ensure logical coherence and structural quality;
- a dialogue generation engine configured to produce synthetic dialogues for both happy paths and unhappy paths, simulating real-world scenarios such as skipped steps or topic changes;
- and
- a training engine configured to fine-tune a large language model using both real and synthetic dialogues to improve an ability to manage multi-turn conversations.
A system for training a large language model to conduct flowchart-guided dialogues, comprising:
- a large language model trained using flowchart-based dialogues;
- a flowchart generation engine configured to create directed acyclic graphs with decision and action nodes;
- a dialogue management engine configured to handle user deviations from predefined flowchart paths, including an ability to skip steps within a flowchart or switch to different flowcharts;
- and
- a decision-making module configured to apply domain-specific logic to guide conversation flow and ensure coherent dialogue management during deviations.
A system for generating synthetic flowcharts to improve dialogue systems, comprising:
- a flowchart generation engine configured to prompt a large language model to generate directed acyclic graphs (DAGs) representing flowchart-based dialogues for various task scenarios;
- a post-processing engine configured to refine generated flowcharts by correcting structural errors and filtering out low-quality outputs;
- a dialogue generation engine configured to produce synthetic dialogues for both happy paths and unhappy paths, including scenarios where users skip steps or jump between flowcharts;
- and
- a training engine configured to fine-tune the large language model using the generated flowcharts and the synthetic dialogues, enhancing an ability to handle both structured and unstructured conversations.
Dependencies are inferred from the claim text.