(question, cluster_chain_of_entities, args)
| 192 | |
| 193 | |
| 194 | def reasoning(question, cluster_chain_of_entities, args): |
| 195 | prompt = prompt_evaluate_wiki + question |
| 196 | chain_prompt = '\n'.join([', '.join([str(x) for x in chain]) for sublist in cluster_chain_of_entities for chain in sublist]) |
| 197 | prompt += "\nKnowledge Triplets: " + chain_prompt + 'A: ' |
| 198 | |
| 199 | response = run_llm(prompt, args.temperature_reasoning, args.max_length, args.opeani_api_keys, args.LLM_type) |
| 200 | |
| 201 | result = extract_answer(response) |
| 202 | if if_true(result): |
| 203 | return True, response |
| 204 | else: |
| 205 | return False, response |
| 206 | |
| 207 | |
| 208 |
no test coverage detected