from typing import List, Annotated from typing_extensions import TypedDict def append_to_list(original: list, new: list) -> list: original.append(new) return original def combine_list(original: list, new: list) -> list: return original + new class GraphState(TypedDict): """ Represents the state of our graph. Attributes: question: question generation: LLM generation new_documents: newly retrieved documents for the current iteration useful_documents: documents that are considered useful graded_documents: documents that have been graded new_queries: newly generated questions hypothesis: hypothesis """ question: str generation: str new_documents: List[str] useful_documents: Annotated[List[str], combine_list] graded_documents: List[str] new_queries: Annotated[List[str], append_to_list] hypothesis: str