@yottagraph-app/aether-instructions 1.1.18 → 1.1.20

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.
@@ -1,310 +0,0 @@
1
- # Relationships
2
-
3
- Relationships (also called "links") represent connections between entities in the Knowledge Graph. These connections are derived from articles.
4
-
5
- ## When to Use
6
-
7
- - You want to find entities connected to a given entity
8
- - You need to understand how two entities are related
9
- - You're exploring a network of connections (e.g., "Who is connected to this person?")
10
- - You need link counts or relationship strength between entities
11
-
12
- ## Key Concepts
13
-
14
- - **Linked Entities**: Other entities that have a relationship with a given entity
15
- - **Link Strength**: Represents the significance of the relationship between two entities
16
- - **Link Counts**: Number of connections between entity pairs, useful for measuring relationship strength
17
- - **Relationship Types**: Common types include:
18
- - `competes_with`
19
- - `compares_to`
20
- - `customer_of`
21
- - `partnered_with`
22
- - `trades_with`
23
- - `invests_in`
24
- - `is_related_to`
25
- - `sues`
26
- - `provides_support_to`
27
-
28
- ## Tips
29
-
30
- - Relationships are bidirectional—if A links to B, B links to A
31
- - High link counts indicate stronger or more frequent connections in the news
32
- - Use with graph endpoints to visualize relationship networks
33
- - **`entity_type` filter limitation**: see the Guidance note on "Get linked entities" below — only three entity types are supported
34
-
35
- <!-- BEGIN GENERATED CONTENT -->
36
-
37
- ## Endpoints
38
-
39
- ### Get linked entities
40
-
41
- `GET /entities/{source_neid}/linked`
42
-
43
- Get list of entities linked to a source entity, optionally filtered by entity type and link type
44
-
45
- #### Parameters
46
-
47
- | Name | Type | Required | Description |
48
- |------|------|----------|-------------|
49
- | source_neid | string | yes | Source entity NEID |
50
- | entity_type | string[] | no | Filter by entity type(s) |
51
- | link_type | string[] | no | Filter by link type(s) |
52
-
53
- #### Responses
54
-
55
- | Status | Description |
56
- |--------|-------------|
57
- | 200 | List of linked entity NEIDs (`GetLinkedEntitiesResponse`) |
58
- | 400 | Invalid parameters (`Error`) |
59
- | 404 | Source entity not found (`Error`) |
60
- | 500 | Internal server error (`Error`) |
61
-
62
- #### Example
63
-
64
- **Request:**
65
-
66
- ```
67
- GET /entities/00416400910670863867/linked
68
- ```
69
-
70
- **Response:**
71
-
72
- ```json
73
- {"entities": ["00416400910670863867"]}
74
- ```
75
-
76
- ---
77
-
78
- ### Get links between entities
79
-
80
- `GET /entities/{source_neid}/links/{target_neid}`
81
-
82
- Get list of links between source and target entities, optionally filtered by link type
83
-
84
- #### Parameters
85
-
86
- | Name | Type | Required | Description |
87
- |------|------|----------|-------------|
88
- | source_neid | string | yes | Source entity NEID |
89
- | target_neid | string | yes | Target entity NEID |
90
- | link_type | string[] | no | Filter by link type(s) |
91
- | include_mentions | boolean | no | Include mention details in response |
92
- | include_articles | boolean | no | Include article details in response |
93
-
94
- #### Responses
95
-
96
- | Status | Description |
97
- |--------|-------------|
98
- | 200 | List of entity links (`GetLinksResponse`) |
99
- | 400 | Invalid parameters (`Error`) |
100
- | 404 | Source or target entity not found (`Error`) |
101
- | 500 | Internal server error (`Error`) |
102
-
103
- #### Example
104
-
105
- **Request:**
106
-
107
- ```
108
- GET /entities/00416400910670863867/links/04358848009837283240
109
- ```
110
-
111
- **Response:**
112
-
113
- ```json
114
- {"links": []}
115
- ```
116
-
117
- ---
118
-
119
- ### Get graph layout
120
-
121
- `GET /graph/{center_neid}/layout`
122
-
123
- Get nodes and edges layout data for visualizing a relationship graph. Response is cached for 5 minutes.
124
-
125
- #### Guidance
126
-
127
- Only use this endpoint if you care about graph-specific properties. Otherwise it is faster to use /entities/{source_neid}/links/{target_neid}. This should always be called with a non-empty list of neids. A typical pattern is to call /graph/{center_neid}/neighborhood and then use the returned NEIDs to call this endpoint.
128
-
129
- #### Parameters
130
-
131
- | Name | Type | Required | Description |
132
- |------|------|----------|-------------|
133
- | center_neid | string | yes | Center entity NEID |
134
- | neid | string[] | no | Additional entity NEIDs to include in layout |
135
- | borderMinX | number | no | Minimum X border for layout |
136
- | borderMinY | number | no | Minimum Y border for layout |
137
- | borderMaxX | number | no | Maximum X border for layout |
138
- | borderMaxY | number | no | Maximum Y border for layout |
139
-
140
- #### Responses
141
-
142
- | Status | Description |
143
- |--------|-------------|
144
- | 200 | Graph layout with nodes and edges (`GraphLayoutResponse`) |
145
- | 400 | Invalid parameters (`Error`) |
146
- | 500 | Internal server error (`Error`) |
147
-
148
- #### Example
149
-
150
- **Request:**
151
-
152
- ```
153
- GET /graph/00416400910670863867/layout?neid=04358848009837283240
154
- ```
155
-
156
- **Response:**
157
-
158
- ```json
159
- {"nodes": [{"neid": "00416400910670863867", "label": "organization|Apple|nationality: us...", "isCentralNode": true, "x": -333.33, "y": -200, "width": 666.67, "height": 266.67}], "edges": [{"source": "00416400910670863867", "target": "04358848009837283240", "label": "competes_with", "path": [{"X": 0, "Y": 0}, {"X": 0, "Y": 66.67}], "article_ids": ["02861951941133789623"], "snippets": ["Apple and Google are mentioned as companies..."], "weight": 0.0267}]}
160
- ```
161
-
162
- ---
163
-
164
- ### Get graph neighborhood
165
-
166
- `GET /graph/{center_neid}/neighborhood`
167
-
168
- Get list of neighboring entities in the relationship graph, optionally filtered by entity type. Response is cached for 5 minutes.
169
-
170
- #### Guidance
171
-
172
- Only use this endpoint if you care about graph-specific properties. Otherwise it is faster to use /entities/{source_neid}/linked. Response includes the center entity itself in the results with a weight of 1.0. The 'neighbors' and 'weights' arrays are parallel (same indices correspond).
173
-
174
- #### Parameters
175
-
176
- | Name | Type | Required | Description |
177
- |------|------|----------|-------------|
178
- | center_neid | string | yes | Center entity NEID |
179
- | size | integer | no | Maximum number of neighbors to return |
180
- | type | string[] | no | Filter by entity type(s) |
181
-
182
- #### Responses
183
-
184
- | Status | Description |
185
- |--------|-------------|
186
- | 200 | Neighbors and their weights (`GraphNeighborhoodResponse`) |
187
- | 400 | Invalid parameters (`Error`) |
188
- | 404 | Center entity not found (`Error`) |
189
- | 500 | Internal server error (`Error`) |
190
-
191
- #### Example
192
-
193
- **Request:**
194
-
195
- ```
196
- GET /graph/00416400910670863867/neighborhood?size=5
197
- ```
198
-
199
- **Response:**
200
-
201
- ```json
202
- {"neighbors": ["00416400910670863867", "04358848009837283240", "00315863961550087877"], "weights": [1, 0.0267, 0.0167]}
203
- ```
204
-
205
- ---
206
-
207
- ### Get link counts between entities
208
-
209
- `GET /graph/{source_neid}/links/{target_neid}/counts`
210
-
211
- Get counts of links between source and target entities over time
212
-
213
- #### Guidance
214
-
215
- Only use this endpoint if you care about graph-specific properties. Otherwise it is faster to use /entities/{source_neid}/links/{target_neid}. Returns link_counts object with relationship types as keys. Values are arrays of timestamps in Excel/OLE serial date format (days since 1899-12-30). Example: 46019.64453125 = 2025-12-28 15:28:07 UTC. The count for each relationship type is the array length (number of observations).
216
-
217
- #### Parameters
218
-
219
- | Name | Type | Required | Description |
220
- |------|------|----------|-------------|
221
- | source_neid | string | yes | Source entity NEID |
222
- | target_neid | string | yes | Target entity NEID |
223
-
224
- #### Responses
225
-
226
- | Status | Description |
227
- |--------|-------------|
228
- | 200 | Link counts by type (`GetLinkCountsResponse`) |
229
- | 400 | Invalid parameters (`Error`) |
230
- | 500 | Internal server error (`Error`) |
231
-
232
- #### Example
233
-
234
- **Request:**
235
-
236
- ```
237
- GET /graph/00416400910670863867/links/04358848009837283240/counts
238
- ```
239
-
240
- **Response:**
241
-
242
- ```json
243
- {"link_counts": {"compares_to": [46019.64453125, 45999.3515625], "competes_with": [45847.5625, 45850.60546875], "customer_of": [45836.9296875], "partnered_with": [], "trades_with": []}}
244
- ```
245
-
246
- ## Types
247
-
248
- ### EntityLink
249
-
250
- A link between two entities
251
-
252
- | Field | Type | Description |
253
- |-------|------|-------------|
254
- | article_ids | string[] | Article IDs where this link was found |
255
- | recorded_at | string | Time when the link was recorded @Format date-time |
256
- | source | string | Source entity NEID |
257
- | target | string | Target entity NEID |
258
- | type | string | Type of link/relationship |
259
-
260
- ### GetLinkCountsResponse
261
-
262
- Response containing link counts between entities
263
-
264
- | Field | Type | Description |
265
- |-------|------|-------------|
266
- | link_counts | object | Map of link type to count values |
267
-
268
- ### GetLinkedEntitiesResponse
269
-
270
- Response containing linked entities
271
-
272
- | Field | Type | Description |
273
- |-------|------|-------------|
274
- | entities | string[] | List of linked entity NEIDs |
275
-
276
- ### GetLinksResponse
277
-
278
- Response containing links between entities
279
-
280
- | Field | Type | Description |
281
- |-------|------|-------------|
282
- | articles | `ArticleDetail`[] | Articles tied to the returned links (only included when requested) |
283
- | links | `EntityLink`[] | List of entity links |
284
- | mentions | `MentionDetail`[] | Mentions tied to the returned links (only included when requested) |
285
-
286
- ### GraphNeighborhoodResponse
287
-
288
- Response containing neighbors of an entity in the relationship graph
289
-
290
- | Field | Type | Description |
291
- |-------|------|-------------|
292
- | neighbors | string[] | List of neighbor NEIDs |
293
- | weights | number[] | Weights corresponding to each neighbor (same order as neighbors) |
294
-
295
- ### LinkedExpression
296
-
297
- | Field | Type | Description |
298
- |-------|------|-------------|
299
- | **linked** | `Linked` | |
300
-
301
- ### Linked
302
-
303
- | Field | Type | Description |
304
- |-------|------|-------------|
305
- | **distance** | integer | Maximum relationship distance to traverse |
306
- | pids | integer[] | Property identifiers defining the relationship types to follow |
307
- | to_entity | string | Target entity ID for relationship traversal |
308
- | direction | string | Direction of relationship traversal. 'outgoing' (default) follows subject->value edges, 'incoming' follows value->subject (reverse) edges, 'both' unions outgoing and incoming results. |
309
-
310
- <!-- END GENERATED CONTENT -->
@@ -1,93 +0,0 @@
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 -->