to returnchain.top_k = 10# Specify whether or not to return the AQL Query in the output dictionarychain.return_aql_query = True# Specify whether or not to return the AQL JSON Result in the output dictionarychain.return_aql_result = True# Specify the maximum amount of AQL Generation attempts that should be madechain.max_aql_generation_attempts = 5# Specify a set of AQL Query Examples, which are passed to# the AQL Generation Prompt Template to promote few-shot-learning.# Defaults to an empty string.chain.aql_examples = """# Is Ned Stark alive?RETURN DOCUMENT('Characters/NedStark').alive# Is Arya Stark the child of Ned Stark?FOR e IN ChildOf    FILTER e._from == "Characters/AryaStark" AND e._to == "Characters/NedStark"    RETURN e"""chain.run("Is Ned Stark alive?")# chain("Is Ned Stark alive?") # Returns a dictionary with the AQL Query & AQL Result            > Entering new ArangoGraphQAChain chain...    AQL Query (1):    RETURN DOCUMENT('Characters/NedStark').alive        AQL Result:    [True]        > Finished chain.    'Yes, according to the information in the database, Ned Stark is alive.'chain.run("Is Bran Stark the child of Ned Stark?")            > Entering new ArangoGraphQAChain chain...    AQL Query (1):    FOR e IN ChildOf        FILTER e._from == "Characters/BranStark" AND e._to == "Characters/NedStark"        RETURN e        AQL Result:    [{'_key': '266218884026', '_id': 'ChildOf/266218884026', '_from': 'Characters/BranStark', '_to': 'Characters/NedStark', '_rev': '_gVPKGSq--_'}]        > Finished chain.    'Yes, according to the information in the ArangoDB database, Bran Stark is indeed the child of Ned Stark.'PreviousDiffbot Graph TransformerNextNeo4j DB QA chainPopulating the DatabaseGetting & Setting the ArangoDB SchemaQuerying the ArangoDB DatabaseChain ModifiersCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
Open In Colab
Open In Colab ->: to returnchain.top_k = 10# Specify whether or not to return the AQL Query in the output dictionarychain.return_aql_query = True# Specify whether or not to return the AQL JSON Result in the output dictionarychain.return_aql_result = True# Specify the maximum amount of AQL Generation attempts that should be madechain.max_aql_generation_attempts = 5# Specify a set of AQL Query Examples, which are passed to# the AQL Generation Prompt Template to promote few-shot-learning.# Defaults to an empty string.chain.aql_examples = """# Is Ned Stark alive?RETURN DOCUMENT('Characters/NedStark').alive# Is Arya Stark the child of Ned Stark?FOR e IN ChildOf    FILTER e._from == "Characters/AryaStark" AND e._to == "Characters/NedStark"    RETURN e"""chain.run("Is Ned Stark alive?")# chain("Is Ned Stark alive?") # Returns a dictionary with the AQL Query & AQL Result            > Entering new ArangoGraphQAChain chain...    AQL Query (1):    RETURN DOCUMENT('Characters/NedStark').alive        AQL Result:    [True]        > Finished chain.    'Yes, according to the information in the database, Ned Stark is alive.'chain.run("Is Bran Stark the child of Ned Stark?")            > Entering new ArangoGraphQAChain chain...    AQL Query (1):    FOR e IN ChildOf        FILTER e._from == "Characters/BranStark" AND e._to == "Characters/NedStark"        RETURN e        AQL Result:    [{'_key': '266218884026', '_id': 'ChildOf/266218884026', '_from': 'Characters/BranStark', '_to': 'Characters/NedStark', '_rev': '_gVPKGSq--_'}]        > Finished chain.    'Yes, according to the information in the ArangoDB database, Bran Stark is indeed the child of Ned Stark.'PreviousDiffbot Graph TransformerNextNeo4j DB QA chainPopulating the DatabaseGetting & Setting the ArangoDB SchemaQuerying the ArangoDB DatabaseChain ModifiersCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.