Spaces:
Sleeping
Sleeping
Update tools/reconcile.py
Browse files- tools/reconcile.py +24 -0
tools/reconcile.py
CHANGED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
def reconcile_documents(text1: str, text2: str) -> str:
|
3 |
+
"""Compares two text documents and identifies differences using LLM analysis.
|
4 |
+
Args:
|
5 |
+
text1: First document text
|
6 |
+
text2: Second document text
|
7 |
+
"""
|
8 |
+
prompt = f"""Perform detailed comparison of these two documents:
|
9 |
+
|
10 |
+
Document 1:
|
11 |
+
{text1}
|
12 |
+
|
13 |
+
Document 2:
|
14 |
+
{text2}
|
15 |
+
|
16 |
+
Identify and list:
|
17 |
+
1. Numerical discrepancies
|
18 |
+
2. Missing information
|
19 |
+
3. Formatting differences
|
20 |
+
4. Semantic contradictions
|
21 |
+
|
22 |
+
Final verdict: Are these documents substantially equivalent?"""
|
23 |
+
|
24 |
+
return f"Comparison request queued: {prompt[:200]}..."
|