Force to use dedupe int ID from FACT INVALIDATION CANDIDATES
This commit is contained in:
parent
da6f3336bb
commit
6c6698f84a
1 changed files with 7 additions and 6 deletions
|
|
@ -73,7 +73,7 @@ def edge(context: dict[str, Any]) -> list[Message]:
|
||||||
<NEW EDGE>
|
<NEW EDGE>
|
||||||
{to_prompt_json(context['extracted_edges'], ensure_ascii=context.get('ensure_ascii', False), indent=2)}
|
{to_prompt_json(context['extracted_edges'], ensure_ascii=context.get('ensure_ascii', False), indent=2)}
|
||||||
</NEW EDGE>
|
</NEW EDGE>
|
||||||
|
|
||||||
Task:
|
Task:
|
||||||
If the New Edges represents the same factual information as any edge in Existing Edges, return the id of the duplicate fact
|
If the New Edges represents the same factual information as any edge in Existing Edges, return the id of the duplicate fact
|
||||||
as part of the list of duplicate_facts.
|
as part of the list of duplicate_facts.
|
||||||
|
|
@ -127,27 +127,28 @@ def resolve_edge(context: dict[str, Any]) -> list[Message]:
|
||||||
<NEW FACT>
|
<NEW FACT>
|
||||||
{context['new_edge']}
|
{context['new_edge']}
|
||||||
</NEW FACT>
|
</NEW FACT>
|
||||||
|
|
||||||
<EXISTING FACTS>
|
<EXISTING FACTS>
|
||||||
{context['existing_edges']}
|
{context['existing_edges']}
|
||||||
</EXISTING FACTS>
|
</EXISTING FACTS>
|
||||||
<FACT INVALIDATION CANDIDATES>
|
<FACT INVALIDATION CANDIDATES>
|
||||||
{context['edge_invalidation_candidates']}
|
{context['edge_invalidation_candidates']}
|
||||||
</FACT INVALIDATION CANDIDATES>
|
</FACT INVALIDATION CANDIDATES>
|
||||||
|
|
||||||
<FACT TYPES>
|
<FACT TYPES>
|
||||||
{context['edge_types']}
|
{context['edge_types']}
|
||||||
</FACT TYPES>
|
</FACT TYPES>
|
||||||
|
|
||||||
|
|
||||||
Task:
|
Task:
|
||||||
If the NEW FACT represents identical factual information of one or more in EXISTING FACTS, return the idx of the duplicate facts.
|
If the NEW FACT represents identical factual information of one or more in EXISTING FACTS, return the idx of the duplicate facts.
|
||||||
Facts with similar information that contain key differences should not be marked as duplicates.
|
Facts with similar information that contain key differences should not be marked as duplicates.
|
||||||
|
When returning the idx list, ensure to use the integer id from FACT INVALIDATION CANDIDATES items, not the uuid from EXISTING FACTS.
|
||||||
If the NEW FACT is not a duplicate of any of the EXISTING FACTS, return an empty list.
|
If the NEW FACT is not a duplicate of any of the EXISTING FACTS, return an empty list.
|
||||||
|
|
||||||
Given the predefined FACT TYPES, determine if the NEW FACT should be classified as one of these types.
|
Given the predefined FACT TYPES, determine if the NEW FACT should be classified as one of these types.
|
||||||
Return the fact type as fact_type or DEFAULT if NEW FACT is not one of the FACT TYPES.
|
Return the fact type as fact_type or DEFAULT if NEW FACT is not one of the FACT TYPES.
|
||||||
|
|
||||||
Based on the provided FACT INVALIDATION CANDIDATES and NEW FACT, determine which existing facts the new fact contradicts.
|
Based on the provided FACT INVALIDATION CANDIDATES and NEW FACT, determine which existing facts the new fact contradicts.
|
||||||
Return a list containing all idx's of the facts that are contradicted by the NEW FACT.
|
Return a list containing all idx's of the facts that are contradicted by the NEW FACT.
|
||||||
If there are no contradicted facts, return an empty list.
|
If there are no contradicted facts, return an empty list.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue