AutomatedScientist commited on
Commit
558f785
·
verified ·
1 Parent(s): 65085d5

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -57,3 +57,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
57
  # Video files - compressed
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
57
  # Video files - compressed
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
60
+ paths_1m.jsonl filter=lfs diff=lfs merge=lfs -text
61
+ trajectories_get_neighbors_1m.jsonl filter=lfs diff=lfs merge=lfs -text
62
+ trajectories_query_relations_1m.jsonl filter=lfs diff=lfs merge=lfs -text
63
+ triplets_all.jsonl filter=lfs diff=lfs merge=lfs -text
.progress_query_relations.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"paths": 1500000, "trajectories": 1000000, "trajectory_path_index": 1188402}
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - text-generation
5
+ tags:
6
+ - knowledge-graph
7
+ - tool-calling
8
+ - trajectories
9
+ size_categories:
10
+ - 1M<n<10M
11
+ ---
12
+
13
+ # WikiKG Trajectories
14
+
15
+ 2M tool-calling trajectories + 366k triplets from Wikipedia knowledge graph.
16
+
17
+ ## Files
18
+
19
+ | File | Records | Size | Description |
20
+ |------|---------|------|-------------|
21
+ | `paths_1m.jsonl` | 1,500,000 | 230 MB | Random walk paths through the graph |
22
+ | `trajectories_query_relations_1m.jsonl` | 1,000,000 | 5.1 GB | Tool-call conversations (query_relations style) |
23
+ | `trajectories_get_neighbors_1m.jsonl` | 1,000,000 | 5.0 GB | Tool-call conversations (get_neighbors style) |
24
+ | `triplets_all.jsonl` | 365,923 | 30 MB | Subject-relation-object triplets |
25
+
26
+ ## Tool-Calling Styles
27
+
28
+ Each trajectory is a multi-turn conversation where an LLM calls tools to traverse the knowledge graph:
29
+
30
+ - **query_relations**: Calls `query_relations(subject, obj, rel_type)` to filter triplets by entity/relation
31
+ - **get_neighbors**: Calls `get_neighbors(entity, direction)` for graph exploration
32
+
33
+ ## Example Trajectory
34
+
35
+ ```json
36
+ {
37
+ "messages": [
38
+ {"role": "user", "content": "Starting from Einstein, follow FIELD_OF forward, then STUDIED_BY backward. What's the final entity?"},
39
+ {"role": "assistant", "tool_calls": [{"function": {"name": "query_relations", "arguments": "{\"subject\": \"Einstein\", \"rel_type\": \"FIELD_OF\"}"}}]},
40
+ {"role": "tool", "content": "[{\"subject\": \"Einstein\", \"relation\": \"FIELD_OF\", \"object\": \"Physics\"}]"},
41
+ ...
42
+ ],
43
+ "metadata": {
44
+ "path_entities": ["Einstein", "Physics", "Feynman"],
45
+ "path_relations": ["FIELD_OF", "STUDIED_BY"],
46
+ "num_hops": 2
47
+ }
48
+ }
49
+ ```
50
+
51
+ ## Example Triplet
52
+
53
+ ```json
54
+ {"subject": "GirardDesargues", "relation": "CREATOR_OF", "object": "DesarguesianPlane"}
55
+ ```
56
+
57
+ ## Source
58
+
59
+ Generated from [wiki-kg-dataset](https://huggingface.co/datasets/amanrangapur/wiki-kg-dataset) containing 45,416 Wikipedia articles and 180+ relation types.
60
+
61
+ ## Usage
62
+
63
+ ```python
64
+ from datasets import load_dataset
65
+
66
+ # Load trajectories
67
+ ds = load_dataset("YOUR_USERNAME/wikikg-trajectories", data_files="trajectories_query_relations_1m.jsonl")
68
+
69
+ # Load triplets
70
+ triplets = load_dataset("YOUR_USERNAME/wikikg-trajectories", data_files="triplets_all.jsonl")
71
+ ```
paths_1m.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b989c9c898322b4de1ff9c918c70fe7e4c3409b39dc7c620d30a19e5795e5f4b
3
+ size 241308416
trajectories_get_neighbors_1m.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e414b1b510e92214a0bbf56fed838b6e95d0028cacb161cbc4d759a6393db55
3
+ size 5402603925
trajectories_query_relations_1m.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a36e6886127d85a60f054008663f04ee170189e4c3218a92418183cd346acf57
3
+ size 5504772636
triplets_all.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:52b51d1e23d0d54e9dd7f2f4de1fb1e5f6be77e6fcd34bec6200244cea988dea
3
+ size 31198688