Update README.md
Browse files
README.md
CHANGED
|
@@ -267,7 +267,7 @@ print("Compressed summary:", compressed)
|
|
| 267 |
|
| 268 |
**Prompt (exact as provided):**
|
| 269 |
|
| 270 |
-
|
| 271 |
prompt_template_classification = """You are a text classification expert specializing in patent documents.
|
| 272 |
You are given a JSON record for a target patent and a set of Retrieved Similar Items.
|
| 273 |
Your task is to assign one or more class labels to a given target patent using the provided examples as guidance.
|
|
@@ -353,9 +353,9 @@ For each Retrieved Similar Item, score along three dimensions and sum to 1–5:
|
|
| 353 |
---
|
| 354 |
|
| 355 |
"""
|
| 356 |
-
|
| 357 |
|
| 358 |
-
|
| 359 |
# Example retrieved neighbors (use COMPRESSED text for better accuracy/latency)
|
| 360 |
retrieved = [
|
| 361 |
{"id": "US-AAA", "label": "H01M10/0525", "text": "Porous carbon hosts for Li-S cathodes..."},
|
|
@@ -381,7 +381,12 @@ if '</answer>' not in cls_text and '<answer>' in cls_text:
|
|
| 381 |
print(cls_text)
|
| 382 |
parsed_ids = parse_answer_ids(cls_text)
|
| 383 |
print("parsed:", parsed_ids)
|
| 384 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 385 |
|
| 386 |
---
|
| 387 |
|
|
|
|
| 267 |
|
| 268 |
**Prompt (exact as provided):**
|
| 269 |
|
| 270 |
+
````python
|
| 271 |
prompt_template_classification = """You are a text classification expert specializing in patent documents.
|
| 272 |
You are given a JSON record for a target patent and a set of Retrieved Similar Items.
|
| 273 |
Your task is to assign one or more class labels to a given target patent using the provided examples as guidance.
|
|
|
|
| 353 |
---
|
| 354 |
|
| 355 |
"""
|
| 356 |
+
````
|
| 357 |
|
| 358 |
+
````python
|
| 359 |
# Example retrieved neighbors (use COMPRESSED text for better accuracy/latency)
|
| 360 |
retrieved = [
|
| 361 |
{"id": "US-AAA", "label": "H01M10/0525", "text": "Porous carbon hosts for Li-S cathodes..."},
|
|
|
|
| 381 |
print(cls_text)
|
| 382 |
parsed_ids = parse_answer_ids(cls_text)
|
| 383 |
print("parsed:", parsed_ids)
|
| 384 |
+
````
|
| 385 |
+
|
| 386 |
+
> **Why 4 backticks?**
|
| 387 |
+
> Model cards sometimes break when a code block contains raw triple backticks inside a Python string.
|
| 388 |
+
> Wrapping the whole snippet with **four backticks** (```` ... ````, as shown) prevents premature termination.
|
| 389 |
+
|
| 390 |
|
| 391 |
---
|
| 392 |
|