Specify required information for the current state to be considered complete.
USAGE
Pathways.required(info_types)
Use to define what must be obtained before the state can transition to the next step. The LLM will focus on gathering this information before proceeding. Can be used in any order within the state configuration.
Parameters
info_types:Union[str, List[str]]
Essential information that must be collected or established. Can be a single string or a list of strings. Be specific and measurable.
Returns
Pathways
Self for method chaining, allowing combination with other pathway building methods to create comprehensive conversation flows.
Integration Notes
State Progression: state cannot progress until required items are addressed
Type Inference: infers state type as "collect" if not explicitly set
Specificity: be specific and concrete for clear guidance
Complementary Use: pair with .optional() for nice-to-have information
Completion Criteria: use .success_condition() to define when requirements are truly met
Systematic Collection: ensures thorough data gathering before progression
The .required() method ensures the LLM won’t proceed until essential information is collected, preventing incomplete processes and ensuring thorough data gathering.