Spaces:
Running
Running
Commit
·
1da7d18
1
Parent(s):
8d064dc
fix(llm): definitively resolve NameError in prompt creation
Browse files- .gitignore +1 -0
- pipeline/llm_service.py +3 -10
.gitignore
CHANGED
@@ -1,2 +1,3 @@
|
|
1 |
venv
|
2 |
__pycache__
|
|
|
|
1 |
venv
|
2 |
__pycache__
|
3 |
+
academic_article.md
|
pipeline/llm_service.py
CHANGED
@@ -406,15 +406,9 @@ class LLMService:
|
|
406 |
|
407 |
## Introduction
|
408 |
|
409 |
-
|
410 |
-
|
411 |
-
1. **Overall Similarity**: Are the texts generally similar or dissimilar?
|
412 |
-
2. **Key Relationships**: Which pairs of texts are most and least similar? What might this imply about their relationship (e.g., different recensions, direct copies, shared sources)?
|
413 |
-
3. **Metric-Specific Insights**: What does each metric (Jaccard, LCS, TF-IDF, Semantic) reveal individually?
|
414 |
-
4. **Synthesis**: Combine the insights from all metrics to form a comprehensive conclusion about the textual relationships.
|
415 |
-
|
416 |
-
## Data
|
417 |
|
|
|
418 |
{md_table}
|
419 |
|
420 |
## Instructions
|
@@ -422,8 +416,7 @@ Below is a table of similarity metrics for a collection of Tibetan texts. Your t
|
|
422 |
Your analysis will be performed using the `{model_name}` model. Provide a concise, scholarly analysis in well-structured markdown.
|
423 |
"""
|
424 |
|
425 |
-
|
426 |
-
prompt = prompt.replace("[CSV_DATA]", csv_data)
|
427 |
|
428 |
return prompt
|
429 |
|
|
|
406 |
|
407 |
## Introduction
|
408 |
|
409 |
+
You will be provided with a table of text similarity scores in Markdown format. Your task is to provide a scholarly interpretation of these results for an academic article on Tibetan textual analysis. Do not simply restate the data. Instead, focus on the *implications* of the scores. What do they suggest about the relationships between the texts? Consider potential reasons for both high and low similarity across different metrics (e.g., shared vocabulary vs. structural differences).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
|
411 |
+
**Data:**
|
412 |
{md_table}
|
413 |
|
414 |
## Instructions
|
|
|
416 |
Your analysis will be performed using the `{model_name}` model. Provide a concise, scholarly analysis in well-structured markdown.
|
417 |
"""
|
418 |
|
419 |
+
|
|
|
420 |
|
421 |
return prompt
|
422 |
|