forked from Archives/langchain
a0ea6f6b6b
# Check if generated Cypher code is wrapped in backticks Some LLMs like the VertexAI like to explain how they generated the Cypher statement and wrap the actual code in three backticks: ![Screenshot from 2023-06-01 08-08-23](https://github.com/hwchase17/langchain/assets/19948365/1d8eecb3-d26c-4882-8f5b-6a9bc7e93690) I have observed a similar pattern with OpenAI chat models in a conversational settings, where multiple user and assistant message are provided to the LLM to generate Cypher statements, where then the LLM wants to maybe apologize for previous steps or explain its thoughts. Interestingly, both OpenAI and VertexAI wrap the code in three backticks if they are doing any explaining or apologizing. Checking if the generated cypher is wrapped in backticks seems like a low-hanging fruit to expand the cypher search to other LLMs and conversational settings. |
||
---|---|---|
.. | ||
query_constructor | ||
__init__.py | ||
test_api.py | ||
test_base.py | ||
test_combine_documents.py | ||
test_constitutional_ai.py | ||
test_conversation.py | ||
test_graph_qa.py | ||
test_hyde.py | ||
test_llm_bash.py | ||
test_llm_checker.py | ||
test_llm_math.py | ||
test_llm_summarization_checker.py | ||
test_llm.py | ||
test_memory.py | ||
test_natbot.py | ||
test_sequential.py | ||
test_transform.py |