|
@@ -169,7 +169,8 @@ Input:
|
|
|
```json id="n1"
|
|
```json id="n1"
|
|
|
{
|
|
{
|
|
|
"topic": "crypto",
|
|
"topic": "crypto",
|
|
|
- "limit": 5
|
|
|
|
|
|
|
+ "limit": 5,
|
|
|
|
|
+ "include_articles": false
|
|
|
}
|
|
}
|
|
|
```
|
|
```
|
|
|
|
|
|
|
@@ -184,7 +185,15 @@ Output:
|
|
|
"sentiment": "positive",
|
|
"sentiment": "positive",
|
|
|
"importance": 0.82,
|
|
"importance": 0.82,
|
|
|
"sources": ["Reuters", "CoinDesk"],
|
|
"sources": ["Reuters", "CoinDesk"],
|
|
|
- "timestamp": "..."
|
|
|
|
|
|
|
+ "timestamp": "...",
|
|
|
|
|
+ "articles": [
|
|
|
|
|
+ {
|
|
|
|
|
+ "title": "...",
|
|
|
|
|
+ "url": "...",
|
|
|
|
|
+ "source": "Reuters",
|
|
|
|
|
+ "timestamp": "..."
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
```
|
|
```
|
|
@@ -197,12 +206,17 @@ Output:
|
|
|
|
|
|
|
|
```json id="n3"
|
|
```json id="n3"
|
|
|
{
|
|
{
|
|
|
- "entity": "BTC"
|
|
|
|
|
|
|
+ "entity": "BTC",
|
|
|
|
|
+ "include_articles": false
|
|
|
}
|
|
}
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
👉 filters clusters by entity
|
|
👉 filters clusters by entity
|
|
|
|
|
|
|
|
|
|
+Optional:
|
|
|
|
|
+
|
|
|
|
|
+* `include_articles` to include article title/url/source/timestamp in the payload
|
|
|
|
|
+
|
|
|
---
|
|
---
|
|
|
|
|
|
|
|
## 3. `get_event_summary`
|
|
## 3. `get_event_summary`
|
|
@@ -211,7 +225,8 @@ Output:
|
|
|
|
|
|
|
|
```json id="n4"
|
|
```json id="n4"
|
|
|
{
|
|
{
|
|
|
- "event_id": "cluster_id"
|
|
|
|
|
|
|
+ "event_id": "cluster_id",
|
|
|
|
|
+ "include_articles": false
|
|
|
}
|
|
}
|
|
|
```
|
|
```
|
|
|
|
|
|
|
@@ -220,6 +235,7 @@ Output:
|
|
|
* merged summary
|
|
* merged summary
|
|
|
* key facts
|
|
* key facts
|
|
|
* sources
|
|
* sources
|
|
|
|
|
+* optional articles (title/url/source/timestamp)
|
|
|
|
|
|
|
|
👉 This is where you compress multiple articles into one clean narrative
|
|
👉 This is where you compress multiple articles into one clean narrative
|
|
|
|
|
|
|
@@ -259,13 +275,45 @@ Output:
|
|
|
{
|
|
{
|
|
|
"topic": "Ethereum ETF",
|
|
"topic": "Ethereum ETF",
|
|
|
"trend_score": 0.91,
|
|
"trend_score": 0.91,
|
|
|
- "related_entities": ["ETH"]
|
|
|
|
|
|
|
+ "related_entities": ["ETH", "BlackRock", "SEC"],
|
|
|
|
|
+ "count": 8,
|
|
|
|
|
+ "avg_importance": 0.17
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
---
|
|
---
|
|
|
|
|
|
|
|
|
|
+## 6. `get_related_entities`
|
|
|
|
|
+
|
|
|
|
|
+> “What entities tend to appear with X?”
|
|
|
|
|
+
|
|
|
|
|
+```json id="n8"
|
|
|
|
|
+{
|
|
|
|
|
+ "subject": "Iran",
|
|
|
|
|
+ "timeframe": "24h",
|
|
|
|
|
+ "limit": 10
|
|
|
|
|
+}
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+Output:
|
|
|
|
|
+
|
|
|
|
|
+```json id="n9"
|
|
|
|
|
+[
|
|
|
|
|
+ {
|
|
|
|
|
+ "entity": "United States",
|
|
|
|
|
+ "count": 5,
|
|
|
|
|
+ "avg_importance": 0.11,
|
|
|
|
|
+ "sentiment": "negative",
|
|
|
|
|
+ "score": -0.2
|
|
|
|
|
+ }
|
|
|
|
|
+]
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+👉 entity-only co-occurrence neighborhood for real-time sense-making
|
|
|
|
|
+
|
|
|
|
|
+---
|
|
|
|
|
+
|
|
|
# ⚠️ 3. What NOT to expose
|
|
# ⚠️ 3. What NOT to expose
|
|
|
|
|
|
|
|
Avoid:
|
|
Avoid:
|
|
@@ -401,6 +449,10 @@ But only if you:
|
|
|
* JSON-backed alias map added for query normalization
|
|
* JSON-backed alias map added for query normalization
|
|
|
* query normalization added so shorthand like `btc` and `trump` still works
|
|
* query normalization added so shorthand like `btc` and `trump` still works
|
|
|
* docs updated with the new env vars and workflow
|
|
* docs updated with the new env vars and workflow
|
|
|
|
|
+* optional article payloads added to event tools
|
|
|
|
|
+* blacklist enforcement maintenance script added
|
|
|
|
|
+* related-entities tool added for co-occurrence neighborhoods
|
|
|
|
|
+* emerging-topic scoring improved with importance-weighting and co-occurrence
|
|
|
|
|
|
|
|
---
|
|
---
|
|
|
|
|
|