@yottagraph-app/elemental-api-skill 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -0
- package/index.js +29 -0
- package/package.json +25 -0
- package/skill/SKILL.md +37 -0
- package/skill/articles.md +386 -0
- package/skill/entities.md +360 -0
- package/skill/events.md +145 -0
- package/skill/find.md +279 -0
- package/skill/graph.md +239 -0
- package/skill/llm.md +18 -0
- package/skill/overview.md +51 -0
- package/skill/relationships.md +308 -0
- package/skill/schema.md +351 -0
- package/skill/sentiment.md +93 -0
- package/skill/server.md +186 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Sentiment
|
|
2
|
+
|
|
3
|
+
Sentiment analysis measures how positively or negatively an entity is portrayed in news coverage. The API provides both daily aggregate scores and scores for individual articles.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- You want to know if news coverage about an entity is positive or negative
|
|
8
|
+
- You need sentiment trends over time (e.g., "How has sentiment changed this month?")
|
|
9
|
+
- You're comparing sentiment between entities or time periods
|
|
10
|
+
|
|
11
|
+
## Key Concepts
|
|
12
|
+
|
|
13
|
+
- **Sentiment Score**: Ranges from -1 (very negative) to +1 (very positive), with 0 being neutral.
|
|
14
|
+
- Individual article/mention scores are discrete values: `-1`, `-0.75`, `-0.5`, `0`, `0.5`, `0.75`, `1`
|
|
15
|
+
- Daily aggregate scores can be any value between -1 and 1 (continuous)
|
|
16
|
+
- **Entity-level vs. Mention-level**: Aggregate sentiment for an entity vs. sentiment of a specific mention
|
|
17
|
+
|
|
18
|
+
## Tips
|
|
19
|
+
|
|
20
|
+
- Sentiment without a time range returns recent data; always specify dates for historical analysis
|
|
21
|
+
- High mention volume with neutral sentiment may indicate routine coverage
|
|
22
|
+
- Sudden sentiment shifts often correlate with specific events
|
|
23
|
+
|
|
24
|
+
<!-- BEGIN GENERATED CONTENT -->
|
|
25
|
+
|
|
26
|
+
## Endpoints
|
|
27
|
+
|
|
28
|
+
### Get entity sentiment data
|
|
29
|
+
|
|
30
|
+
`GET /graph/{neid}/sentiment`
|
|
31
|
+
|
|
32
|
+
Get sentiment analysis data for a named entity including scores, timestamps, and daily averages. Response is cached for 5 minutes.
|
|
33
|
+
|
|
34
|
+
#### Guidance
|
|
35
|
+
|
|
36
|
+
Response is wrapped in a 'sentiment' container object. The sentiment_scores field is a flat array of numbers (not timestamped objects). The time interval for the scores is provided separately in time_interval.start and time_interval.end.
|
|
37
|
+
|
|
38
|
+
#### Parameters
|
|
39
|
+
|
|
40
|
+
| Name | Type | Required | Description |
|
|
41
|
+
|------|------|----------|-------------|
|
|
42
|
+
| neid | string | yes | Named Entity ID |
|
|
43
|
+
|
|
44
|
+
#### Responses
|
|
45
|
+
|
|
46
|
+
| Status | Description |
|
|
47
|
+
|--------|-------------|
|
|
48
|
+
| 200 | Sentiment data for the entity (`GetNamedEntitySentimentResponse`) |
|
|
49
|
+
| 400 | Invalid NEID (`Error`) |
|
|
50
|
+
| 404 | Entity not found (`Error`) |
|
|
51
|
+
| 500 | Internal server error (`Error`) |
|
|
52
|
+
|
|
53
|
+
#### Example
|
|
54
|
+
|
|
55
|
+
**Request:**
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
GET /graph/00416400910670863867/sentiment
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Response:**
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{"sentiment": {"neid": "00416400910670863867", "time_interval": {"start": "2026-01-04T03:02:25.384Z", "end": "2026-02-03T03:02:25.384Z"}, "num_mentions": 28662, "sentiment_scores": [0.5, 0.5, 0.5, 0, 0.5, -0.5, 1]}}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Types
|
|
68
|
+
|
|
69
|
+
### GetNamedEntitySentimentResponse
|
|
70
|
+
|
|
71
|
+
Response containing sentiment data for a named entity
|
|
72
|
+
|
|
73
|
+
| Field | Type | Description |
|
|
74
|
+
|-------|------|-------------|
|
|
75
|
+
| sentiment | `NamedEntitySentiment` | |
|
|
76
|
+
|
|
77
|
+
### NamedEntitySentiment
|
|
78
|
+
|
|
79
|
+
The sentiment data
|
|
80
|
+
|
|
81
|
+
| Field | Type | Description |
|
|
82
|
+
|-------|------|-------------|
|
|
83
|
+
| daily_timestamps | string[] | Timestamps associated with each daily sentiment trend |
|
|
84
|
+
| direct_sentiment_daily_averages | number[] | The average direct sentiment score for the entity for each day in the time interval |
|
|
85
|
+
| neid | string | Named Entity ID |
|
|
86
|
+
| num_mentions | integer | Number of times the entity has been directly mentioned in an article |
|
|
87
|
+
| propagated_sentiment_daily_averages | number[] | The average propagated sentiment score for the entity for each day in the time interval |
|
|
88
|
+
| sentiment_article_nindexes | string[] | Nindexes of the articles that correspond to each direct sentiment score |
|
|
89
|
+
| sentiment_scores | number[] | All direct sentiment scores for the entity |
|
|
90
|
+
| sentiment_timestamps | string[] | Timestamps associated with each direct sentiment score |
|
|
91
|
+
| time_interval | `TimeInterval` | |
|
|
92
|
+
|
|
93
|
+
<!-- END GENERATED CONTENT -->
|
package/skill/server.md
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Server
|
|
2
|
+
|
|
3
|
+
The server endpoint provides server health and status information. Use it to verify the Query Server is running.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- You need to verify the server is operational before making queries
|
|
8
|
+
- You're debugging connection or availability issues
|
|
9
|
+
|
|
10
|
+
## Key Concepts
|
|
11
|
+
|
|
12
|
+
- **Server Status**: Whether the server is healthy and responding
|
|
13
|
+
|
|
14
|
+
## Tips
|
|
15
|
+
|
|
16
|
+
- Call health first if other endpoints are failing to rule out server issues
|
|
17
|
+
|
|
18
|
+
<!-- BEGIN GENERATED CONTENT -->
|
|
19
|
+
|
|
20
|
+
## Endpoints
|
|
21
|
+
|
|
22
|
+
### Get server status
|
|
23
|
+
|
|
24
|
+
`GET /status`
|
|
25
|
+
|
|
26
|
+
Get status information about the Query Server including instance UUID, start time, data range, and capabilities
|
|
27
|
+
|
|
28
|
+
#### Responses
|
|
29
|
+
|
|
30
|
+
| Status | Description |
|
|
31
|
+
|--------|-------------|
|
|
32
|
+
| 200 | Server status information (`StatusResponse`) |
|
|
33
|
+
| 500 | Internal server error (`Error`) |
|
|
34
|
+
|
|
35
|
+
#### Example
|
|
36
|
+
|
|
37
|
+
**Request:**
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
GET /status
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Response:**
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{"qs_instance_uuid": "fb6d99f8-327f-4d51-9ae4-f947efb5f7da", "qs_start_time": "2026-01-29T22:10:24.550922989Z", "data_min_date": "2026-02-03T02:02:04.35431602Z", "data_max_date": "2026-02-03T04:02:04.354316094Z", "capabilities": ["elemental_api", "sentiment", "knowledge", "ada"]}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
### Health check (query parameters)
|
|
52
|
+
|
|
53
|
+
`GET /elemental/health`
|
|
54
|
+
|
|
55
|
+
Check the health status of the Elemental API service using query parameters.
|
|
56
|
+
|
|
57
|
+
#### Parameters
|
|
58
|
+
|
|
59
|
+
| Name | Type | Required | Description |
|
|
60
|
+
|------|------|----------|-------------|
|
|
61
|
+
| deadline | any | no | Response deadline in milliseconds or duration format (e.g., '500ms') |
|
|
62
|
+
|
|
63
|
+
#### Responses
|
|
64
|
+
|
|
65
|
+
| Status | Description |
|
|
66
|
+
|--------|-------------|
|
|
67
|
+
| 200 | Health check successful (`HealthResponse`) |
|
|
68
|
+
| 400 | Bad request - invalid parameters or malformed expression (`Error`) |
|
|
69
|
+
| 500 | Internal server error (`Error`) |
|
|
70
|
+
| 501 | Elemental API capability not enabled (`Error`) |
|
|
71
|
+
|
|
72
|
+
#### Example
|
|
73
|
+
|
|
74
|
+
**Request:**
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
GET /elemental/health?deadline=500
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Response:**
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{"op_id": "73f13792-5d18-4519-a0ec-0a25cbc85b00", "follow_up": false, "status": "healthy", "ts": "2026-02-03T03:02:04.170028579Z", "version": "0.2.0", "start_time": "2026-01-29T22:10:24.550922989Z"}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### Health check (form data)
|
|
89
|
+
|
|
90
|
+
`POST /elemental/health`
|
|
91
|
+
|
|
92
|
+
Check the health status of the Elemental API service using form-encoded parameters.
|
|
93
|
+
|
|
94
|
+
#### Request Body
|
|
95
|
+
|
|
96
|
+
**Content-Type:** `application/x-www-form-urlencoded`
|
|
97
|
+
|
|
98
|
+
| Name | Type | Required | Description |
|
|
99
|
+
|------|------|----------|-------------|
|
|
100
|
+
| deadline | any | no | Response deadline in milliseconds or duration format |
|
|
101
|
+
|
|
102
|
+
#### Responses
|
|
103
|
+
|
|
104
|
+
| Status | Description |
|
|
105
|
+
|--------|-------------|
|
|
106
|
+
| 200 | Health check successful (`HealthResponse`) |
|
|
107
|
+
| 400 | Bad request - invalid parameters or malformed expression (`Error`) |
|
|
108
|
+
| 500 | Internal server error (`Error`) |
|
|
109
|
+
| 501 | Elemental API capability not enabled (`Error`) |
|
|
110
|
+
|
|
111
|
+
#### Example
|
|
112
|
+
|
|
113
|
+
**Request:**
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
POST /elemental/health
|
|
117
|
+
Content-Type: application/x-www-form-urlencoded
|
|
118
|
+
|
|
119
|
+
deadline=500
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Response:**
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{"op_id": "73f13792-5d18-4519-a0ec-0a25cbc85b00", "follow_up": false, "status": "healthy", "ts": "2026-02-03T03:02:04.170028579Z", "version": "0.2.0", "start_time": "2026-01-29T22:10:24.550922989Z"}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Types
|
|
129
|
+
|
|
130
|
+
### StatusResponse
|
|
131
|
+
|
|
132
|
+
Status information about the Query Server instance
|
|
133
|
+
|
|
134
|
+
| Field | Type | Description |
|
|
135
|
+
|-------|------|-------------|
|
|
136
|
+
| capabilities | `Capability`[] | Capabilities enabled on this QS instance |
|
|
137
|
+
| data_max_date | string | Maximum date of available data @Format date-time |
|
|
138
|
+
| data_min_date | string | Minimum date of available data @Format date-time |
|
|
139
|
+
| extrapolated_max_date | string | Extrapolated maximum date (unset if realtime isn't enabled on this server) @Format date-time |
|
|
140
|
+
| qs_instance_uuid | string | UUID of this QS instance. Changes every time the QS restarts. |
|
|
141
|
+
| qs_start_time | string | When this QS instance was started @Format date-time |
|
|
142
|
+
|
|
143
|
+
### BaseResponse
|
|
144
|
+
|
|
145
|
+
Common response fields for all Elemental API operations
|
|
146
|
+
|
|
147
|
+
| Field | Type | Description |
|
|
148
|
+
|-------|------|-------------|
|
|
149
|
+
| **op_id** | string (uuid) | Unique operation identifier for tracking and follow-up requests |
|
|
150
|
+
| **follow_up** | boolean | Whether additional results are available via follow-up request |
|
|
151
|
+
| error | string | Error code if operation failed |
|
|
152
|
+
| min_sl | integer | Minimum security level in response |
|
|
153
|
+
| max_sl | integer | Maximum security level in response |
|
|
154
|
+
|
|
155
|
+
### HealthResponse
|
|
156
|
+
|
|
157
|
+
| Field | Type | Description |
|
|
158
|
+
|-------|------|-------------|
|
|
159
|
+
| health | `HealthData` | |
|
|
160
|
+
|
|
161
|
+
### HealthData
|
|
162
|
+
|
|
163
|
+
| Field | Type | Description |
|
|
164
|
+
|-------|------|-------------|
|
|
165
|
+
| **status** | string | Current health status of the service. Values: `healthy`, `degraded`, `unhealthy` |
|
|
166
|
+
| **ts** | string (date-time) | Timestamp of the health check |
|
|
167
|
+
| **version** | string | Service version information |
|
|
168
|
+
| **uptime** | integer | Service uptime in nanoseconds |
|
|
169
|
+
|
|
170
|
+
### TimeRange
|
|
171
|
+
|
|
172
|
+
Time range with optional start and end times
|
|
173
|
+
|
|
174
|
+
| Field | Type | Description |
|
|
175
|
+
|-------|------|-------------|
|
|
176
|
+
| start | string (date-time) | Start time of the range |
|
|
177
|
+
| end | string (date-time) | End time of the range |
|
|
178
|
+
|
|
179
|
+
### Error
|
|
180
|
+
|
|
181
|
+
| Field | Type | Description |
|
|
182
|
+
|-------|------|-------------|
|
|
183
|
+
| **error** | string | Error code or brief description |
|
|
184
|
+
| error_message | string | Detailed error message |
|
|
185
|
+
|
|
186
|
+
<!-- END GENERATED CONTENT -->
|