Hi, I am using the default template and default parser with an open-source LLM to generate sub-questions. Here is an example of the generated sub-questions in json format:
LLMQuestionGenerator.generate(), prediction =
{{
"items": [
{{
"sub_question": "What is the summary of the article about Paul Graham?",
"tool_name": "summary"
}},
{{
"sub_question": "What are some specific facts about Paul Graham mentioned in the article?",
"tool_name": "vector_search"
}}
]
}}
As you can see above, "{{" and "}}" is in the json and causing the default json parser to fail. I noticed the default prompt below is instructing the LLM to replace "{" with "{{" and "}" with "}}":
https://github.com/run-llama/llama_index/blob/369973f4e8c1d6928149f0904b25473faeadb116/llama-index-core/llama_index/core/question_gen/prompts.py#L68C1-L72C2I tried removing the "replace" lines above and the sub-questions generated are in correct json format. I wonder if there were reasons to do the "replace" in the template to begin with? In other words, will there be any negative impact if I remove the "replace" in the default template?