## Text Document: Prompt Template of Graph-RFT
### Overview
The image presents a text document titled "Prompt Template of Graph-RFT". It outlines a step-by-step reasoning process for answering questions, incorporating sub-problem search functions and logic functions. It also details how to search for information using knowledge graphs (KG) and web search engines.
### Components/Axes
The document is structured as follows:
1. **Title:** "Prompt Template of Graph-RFT"
2. **Introduction:** A general description of the reasoning process.
3. **Sub-problem Search Function:** Defines two search functions, `Ans=SearchKG` and `Ans2=SearchKG`, for retrieving information from a knowledge graph.
4. **Sub-problem Logic Functions:** Defines three logic functions: `Intersect`, `Union`, and `Negation`.
5. **Search Process:** Describes the steps to search for information using `<relation_search>`, `<neighbor_search>`, and `<web_search>`.
6. **Final Step:** Indicates that the answer can be provided inside `<answer>` and `</answer>` if no further external knowledge is needed.
### Detailed Analysis or ### Content Details
The document contains the following text:
"Prompt Template of Graph-RFT
Given the question, you must conduct reasoning step by step with a priority logical relationship in accordance with Descartes' Princples inside <think> and </think>, which enables the system to start from the most basic sub-problems that do not rely on any prior information. As each sub-problem is solved, its answer will serve as the background basis for subsequent retrieval, thereby guiding the handling of more dependent sub-problems step by step. Aftering thinking the whole reasoning process, you must give the plan process inside <plan> and </plan>, which encompass each step's problem and the logic functions of them. The functions are as follows:
Sub-problem Search Function:
Ans=SearchKG (t=target_type | h = topic_entity, r = relation_type of h and t) describe given the topic entity and relation of the topic entity and target type in sub-problem, please use KG retrieval tool to find the answer.
If the sub-problem need the prefined sub-problem's answer, we can use Ans2=SearchKG (t=target_type | h = Ans1, r = relation_type of h and t) to plan the sequential relationship of subproblems.
Sub-problem Logic Fuctions:
Intersect (sub-problem1, sub-problem2...) describe the intersection of the answer of the sub-problems.
Union (sub-problem1, sub-problem2...) describe the union of the answer of the sub-problems.
Negation (sub-problem1, sub-problem2...) represents remove all elements from the sub-problem1 (main set) that match sub-problem2..., and return a new set that does not contain these.
After planning the whole process, you start with the first step. If you need to search in KG when SearchKG() exist, You must first call <relation_search> h, r </relation_search>, and it will return top15 relevant relation for you to select based on sub-problem within <relation_information> and </relation_information>. If there is no relevant relation, you can call a web search engine by <web_search>h, r</web_search>.
After getting the relation, you must second call a neighbor search engine by <neighbor_search> h, r </neighbor_search> and it will search the neighbors of the entity with the specified relation in the KG between <neighbor_information> and </neighbor_information>.
If there is no neighbor information, you can call a web search engine by <web_search>h, r</web_search> and it will return the top searched results between <web_information> and </web_information>.
You can search based on plan process, If you find no further external knowledge needed, you can directly provide the answer inside <answer> and </answer>"
### Key Observations
* The document provides a structured approach to answering questions by breaking them down into sub-problems.
* It leverages knowledge graphs and web search engines to gather information.
* It uses specific tags like `<think>`, `<plan>`, `<relation_search>`, `<neighbor_search>`, `<web_search>`, and `<answer>` to denote different stages and actions in the reasoning process.
* The document uses the term "Descartes' Princples" (likely a typo for "Principles") to emphasize a logical and systematic approach.
### Interpretation
The document outlines a template for a question-answering system that uses a combination of knowledge graph retrieval and web search. The system first attempts to solve the problem by breaking it down into smaller, more manageable sub-problems. It then uses a knowledge graph to find relevant information. If the knowledge graph does not contain the necessary information, the system resorts to web search. The use of specific tags suggests that this template is designed to be used by a machine learning model or other automated system. The emphasis on logical reasoning and step-by-step problem-solving indicates that the system is intended to be transparent and explainable.