참고소스 수정본
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"version_": "1",
|
||||
"template_": "none",
|
||||
"name": "",
|
||||
"neo4j_config": {
|
||||
"params_": {
|
||||
"uri": {
|
||||
"resolver_": "ENV",
|
||||
"var_": "NEO4J_URI"
|
||||
},
|
||||
"user": {
|
||||
"resolver_": "ENV",
|
||||
"var_": "NEO4J_USER"
|
||||
},
|
||||
"password": {
|
||||
"resolver_": "ENV",
|
||||
"var_": "NEO4J_PASSWORD"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extras": {
|
||||
"database": "neo4j"
|
||||
},
|
||||
"component_config": {
|
||||
"splitter": {
|
||||
"class_": "text_splitters.fixed_size_splitter.FixedSizeSplitter",
|
||||
"params_": {
|
||||
"chunk_size": 100,
|
||||
"chunk_overlap": 10
|
||||
}
|
||||
},
|
||||
"builder": {
|
||||
"class_": "lexical_graph.LexicalGraphBuilder",
|
||||
"params_": {
|
||||
"config": {
|
||||
"chunk_node_label": "TextPart"
|
||||
}
|
||||
}
|
||||
},
|
||||
"writer": {
|
||||
"name_": "writer",
|
||||
"class_": "kg_writer.Neo4jWriter",
|
||||
"params_": {
|
||||
"driver": {
|
||||
"resolver_": "CONFIG_KEY",
|
||||
"key_": "neo4j_config.default"
|
||||
},
|
||||
"neo4j_database": {
|
||||
"resolver_": "CONFIG_KEY",
|
||||
"key_": "extras.database"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"connection_config": [
|
||||
{
|
||||
"start": "splitter",
|
||||
"end": "builder",
|
||||
"input_config": {
|
||||
"text_chunks": "splitter"
|
||||
}
|
||||
},
|
||||
{
|
||||
"start": "builder",
|
||||
"end": "writer",
|
||||
"input_config": {
|
||||
"graph": "builder.graph",
|
||||
"lexical_graph_config": "builder.config"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
version_: "1"
|
||||
template_: none
|
||||
neo4j_config:
|
||||
params_:
|
||||
uri:
|
||||
resolver_: ENV
|
||||
var_: NEO4J_URI
|
||||
user:
|
||||
resolver_: ENV
|
||||
var_: NEO4J_USER
|
||||
password:
|
||||
resolver_: ENV
|
||||
var_: NEO4J_PASSWORD
|
||||
extras:
|
||||
database: neo4j
|
||||
component_config:
|
||||
splitter:
|
||||
class_: text_splitters.fixed_size_splitter.FixedSizeSplitter
|
||||
params_:
|
||||
chunk_size: 100
|
||||
chunk_overlap: 10
|
||||
builder:
|
||||
class_: lexical_graph.LexicalGraphBuilder
|
||||
params_:
|
||||
config:
|
||||
chunk_node_label: TextPart
|
||||
writer:
|
||||
class_: kg_writer.Neo4jWriter
|
||||
params_:
|
||||
driver:
|
||||
resolver_: CONFIG_KEY
|
||||
key_: neo4j_config.default
|
||||
neo4j_database:
|
||||
resolver_: CONFIG_KEY
|
||||
key_: extras.database
|
||||
connection_config:
|
||||
- start: splitter
|
||||
end: builder
|
||||
input_config:
|
||||
text_chunks: splitter
|
||||
- start: builder
|
||||
end: writer
|
||||
input_config:
|
||||
graph: builder.graph
|
||||
lexical_graph_config: builder.config
|
||||
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"version_": "1",
|
||||
"template_": "SimpleKGPipeline",
|
||||
"extras": {
|
||||
"openai_api_key": {
|
||||
"resolver_": "ENV",
|
||||
"var_": "MY_OPENAI_KEY"
|
||||
}
|
||||
},
|
||||
"neo4j_config": {
|
||||
"params_": {
|
||||
"uri": {
|
||||
"resolver_": "ENV",
|
||||
"var_": "NEO4J_URI"
|
||||
},
|
||||
"user": {
|
||||
"resolver_": "ENV",
|
||||
"var_": "NEO4J_USER"
|
||||
},
|
||||
"password": {
|
||||
"resolver_": "ENV",
|
||||
"var_": "NEO4J_PASSWORD"
|
||||
}
|
||||
}
|
||||
},
|
||||
"llm_config": {
|
||||
"class_": "OpenAILLM",
|
||||
"params_": {
|
||||
"api_key": {
|
||||
"resolver_": "ENV",
|
||||
"var_": "OPENAI_API_KEY"
|
||||
},
|
||||
"model_name": "gpt-5",
|
||||
"model_params": {
|
||||
"temperature": 0,
|
||||
"max_tokens": 2000,
|
||||
"response_format": {"type": "json_object"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"embedder_config": {
|
||||
"class_": "OpenAIEmbeddings",
|
||||
"params_": {
|
||||
"api_key": {
|
||||
"resolver_": "CONFIG_KEY",
|
||||
"key_": "extras.openai_api_key"
|
||||
}
|
||||
}
|
||||
},
|
||||
"from_file": true,
|
||||
"entities": [
|
||||
"Person",
|
||||
"Organization",
|
||||
"Horcrux",
|
||||
"Location"
|
||||
],
|
||||
"relations": [
|
||||
"SITUATED_AT",
|
||||
"INTERACTS",
|
||||
"OWNS",
|
||||
"LED_BY"
|
||||
],
|
||||
"potential_schema": [
|
||||
["Person", "SITUATED_AT", "Location"],
|
||||
["Person", "INTERACTS", "Person"],
|
||||
["Person", "OWNS", "Horcrux"],
|
||||
["Organization", "LED_BY", "Person"]
|
||||
],
|
||||
"perform_entity_resolution": true
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
version_: "1"
|
||||
template_: SimpleKGPipeline
|
||||
neo4j_config:
|
||||
params_:
|
||||
uri:
|
||||
resolver_: ENV
|
||||
var_: NEO4J_URI
|
||||
user:
|
||||
resolver_: ENV
|
||||
var_: NEO4J_USER
|
||||
password:
|
||||
resolver_: ENV
|
||||
var_: NEO4J_PASSWORD
|
||||
llm_config:
|
||||
class_: OpenAILLM
|
||||
params_:
|
||||
api_key:
|
||||
resolver_: ENV
|
||||
var_: OPENAI_API_KEY
|
||||
model_name: gpt-5
|
||||
model_params:
|
||||
temperature: 0
|
||||
max_tokens: 2000
|
||||
response_format:
|
||||
type: json_object
|
||||
embedder_config:
|
||||
class_: OpenAIEmbeddings
|
||||
params_:
|
||||
api_key:
|
||||
resolver_: ENV
|
||||
var_: OPENAI_API_KEY
|
||||
from_file: true
|
||||
entities:
|
||||
- Person
|
||||
- Organization
|
||||
- Location
|
||||
- Horcrux
|
||||
relations:
|
||||
- SITUATED_AT
|
||||
- INTERACTS
|
||||
- OWNS
|
||||
- LED_BY
|
||||
potential_schema:
|
||||
- ["Person", "SITUATED_AT", "Location"]
|
||||
- ["Person", "INTERACTS", "Person"]
|
||||
- ["Person", "OWNS", "Horcrux"]
|
||||
- ["Organization", "LED_BY", "Person"]
|
||||
text_splitter:
|
||||
class_: text_splitters.fixed_size_splitter.FixedSizeSplitter
|
||||
perform_entity_resolution: true
|
||||
@@ -0,0 +1,22 @@
|
||||
# Extract: *Deathly Hallows* (spoiler section)
|
||||
|
||||
> **Note:** This is synthetic test corpus text for GraphRAG pipelines—not a reproduction of the novel.
|
||||
|
||||
## Malfoy Manor
|
||||
|
||||
At **Malfoy Manor**, *Severus Snape* tells **Voldemort** the date that [Harry Potter](https://example.com/harry-potter)’s friends are planning to move him from the house on **Privet Drive** to a new safe location, so that Voldemort can capture Harry en route.
|
||||
|
||||
Key locations in this beat:
|
||||
|
||||
- Malfoy Manor
|
||||
- Privet Drive (the Dursleys’ home)
|
||||
|
||||
---
|
||||
|
||||
## Privet Drive
|
||||
|
||||
As Harry packs to leave Privet Drive, he reads two obituaries for **Albus Dumbledore**, both of which make him think that he didn’t know Dumbledore as well as he should have. Downstairs, he bids good-bye to the **Dursleys** for the final time, as the threat of Voldemort forces them to go into hiding themselves.
|
||||
|
||||
## Flight from Privet Drive
|
||||
|
||||
The **Order of the Phoenix**, led by Alastor “Mad-Eye” **Moody**, arrives to take Harry to his new home at the **Weasleys’** house, *the Burrow*. Six of Harry’s friends take `Polyjuice Potion` to disguise themselves as Harry and act as decoys, and they all fly off in different directions. The **Death Eaters**, alerted to their departure by Snape, attack Harry and his friends. Voldemort chases Harry down, but Harry’s wand fends Voldemort off, seemingly without Harry’s help.
|
||||
@@ -0,0 +1,68 @@
|
||||
%PDF-1.4
|
||||
%“Œ‹ž ReportLab Generated PDF document (opensource)
|
||||
1 0 obj
|
||||
<<
|
||||
/F1 2 0 R
|
||||
>>
|
||||
endobj
|
||||
2 0 obj
|
||||
<<
|
||||
/BaseFont /Helvetica /Encoding /WinAnsiEncoding /Name /F1 /Subtype /Type1 /Type /Font
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<<
|
||||
/Contents 7 0 R /MediaBox [ 0 0 612 792 ] /Parent 6 0 R /Resources <<
|
||||
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ]
|
||||
>> /Rotate 0 /Trans <<
|
||||
|
||||
>>
|
||||
/Type /Page
|
||||
>>
|
||||
endobj
|
||||
4 0 obj
|
||||
<<
|
||||
/PageMode /UseNone /Pages 6 0 R /Type /Catalog
|
||||
>>
|
||||
endobj
|
||||
5 0 obj
|
||||
<<
|
||||
/Author (\(anonymous\)) /CreationDate (D:20260325100009+01'00') /Creator (\(unspecified\)) /Keywords () /ModDate (D:20260325100009+01'00') /Producer (ReportLab PDF Library - \(opensource\))
|
||||
/Subject (\(unspecified\)) /Title (\(anonymous\)) /Trapped /False
|
||||
>>
|
||||
endobj
|
||||
6 0 obj
|
||||
<<
|
||||
/Count 1 /Kids [ 3 0 R ] /Type /Pages
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<<
|
||||
/Filter [ /ASCII85Decode /FlateDecode ] /Length 875
|
||||
>>
|
||||
stream
|
||||
Gas1]9lCq)&A@Zck"%!h=i*[U9LPm%)DtMkHg/MNB<d*@VRAFQrV(^u&>2@'[;3rI+)g#*EBtg37K/T1dJ]4lI4_B7e$>]W17Z_^4$>-AIs]/kErMJ=?]m.h7et93HZ1Ll,8G0tG@<s$bW#d:)%B*THo@DAZDIP+UdniCf3tr0&*V](/Q61i!r[./Ep\7MW0jB:pn:*ODo2D>cZhP^<-c_h"qmMACP9+LXslE3h(+];2%3`\gcs0VKpEe]/#?7K#u&XmPLluXBp"_B-cg=$5u^OtPp0sU#8GrGmh&>E/Db5[O>`jW[cC^-H$Dj_Z@:dn-O_X6qu:an^...-G)=6<?.`fHMK0@CG/FAMS5qHhnE*l(T\);G.ifQ0`k\)8ZtS`i@Hfo@<\>kB't$Z#MJBE<llBj*8#>Tb7m^*?9:P.+['?bsM*iI`$gH(H])\:Z,R%:;>.E.<.'sL&eOfqng,XGbl8%rY)YFo+%u.\:bbTZ`XY:H3%B,)RNhSjK0k!8g!qVTHmlH/-444nFdPA98NWYbP%bF.\*F04j3ksD7e'UUHQ2pd!9D/[)6N*]">Q$I1=HZ]*h&-eKM?KKZO$_\cFH#U?*l1O*>()PgWuI6L42l84+a9r,2->opHI?b,B=Yu[[biVkO%CnF4[7"9mMkV#4/?NfQ@N8.Vk!.rRI6p!A_NtP8;X/QlUD+C@2"Ng:Y-)QY`_BlP?sDFf0T.Q"@)fOO&VuDnd6!QBN;<M)mT!>VHdP#M7a!K<qLpi:OOGrqZu2)m@sQ+_arVkT;N9kjspSS0k)p%#UXQ"YA\YHb=Vn$%$O)G@N(]A9;[F;H`AReF*'nY\075TZkt9-FTg*)mY]9_C<'&HqeLb/rrBAcZon~>endstream
|
||||
endobj
|
||||
xref
|
||||
0 8
|
||||
0000000000 65535 f
|
||||
0000000061 00000 n
|
||||
0000000092 00000 n
|
||||
0000000199 00000 n
|
||||
0000000392 00000 n
|
||||
0000000460 00000 n
|
||||
0000000740 00000 n
|
||||
0000000799 00000 n
|
||||
trailer
|
||||
<<
|
||||
/ID
|
||||
[<26c6907198ada36f327d0bf38cfa3140><26c6907198ada36f327d0bf38cfa3140>]
|
||||
% ReportLab generated PDF document -- digest (opensource)
|
||||
|
||||
/Info 5 0 R
|
||||
/Root 4 0 R
|
||||
/Size 8
|
||||
>>
|
||||
startxref
|
||||
1764
|
||||
%%EOF
|
||||
@@ -0,0 +1,15 @@
|
||||
At Malfoy Manor, Snape tells Voldemort the date that Harry’s friends are planning to
|
||||
move him from the house on Privet Drive to a new safe location, so that Voldemort
|
||||
can capture Harry en route.
|
||||
|
||||
As Harry packs to leave Privet Drive, he reads two obituaries for Dumbledore, both
|
||||
of which make him think that he didn’t know Dumbledore as well as he should have.
|
||||
Downstairs, he bids good-bye to the Dursleys for the final time, as the threat of
|
||||
Voldemort forces them to go into hiding themselves.
|
||||
|
||||
The Order of the Phoenix, led by Alastor “Mad-Eye” Moody, arrives to take Harry to
|
||||
his new home at the Weasleys’ house, the Burrow. Six of Harry’s friends take
|
||||
Polyjuice Potion to disguise themselves as Harry and act as decoys, and they all fly
|
||||
off in different directions. The Death Eaters, alerted to their departure by Snape,
|
||||
attack Harry and his friends. Voldemort chases Harry down, but Harry’s wand fends
|
||||
Voldemort off, seemingly without Harry’s help.
|
||||
@@ -0,0 +1,14 @@
|
||||
# Part 1 — Malfoy Manor & Privet Drive
|
||||
|
||||
> *Test fixture:* markdown with headings, links, and lists.
|
||||
|
||||
## Malfoy Manor
|
||||
|
||||
At **Malfoy Manor**, *Severus Snape* tells **Voldemort** the date that [Harry Potter](https://example.com/harry-potter)’s friends are planning to move him from the house on **Privet Drive** to a new safe location, so that Voldemort can capture Harry en route.
|
||||
|
||||
- **Antagonists:** Voldemort; Snape (as informant)
|
||||
- **Stakes:** Harry’s planned move from Privet Drive
|
||||
|
||||
## Privet Drive
|
||||
|
||||
As Harry packs to leave Privet Drive, he reads two obituaries for **Albus Dumbledore**, both of which make him think that he didn’t know Dumbledore as well as he should have. Downstairs, he bids good-bye to the **Dursleys** for the final time, as the threat of Voldemort forces them to go into hiding themselves.
|
||||
@@ -0,0 +1,8 @@
|
||||
At Malfoy Manor, Snape tells Voldemort the date that Harry’s friends are planning to
|
||||
move him from the house on Privet Drive to a new safe location, so that Voldemort
|
||||
can capture Harry en route.
|
||||
|
||||
As Harry packs to leave Privet Drive, he reads two obituaries for Dumbledore, both
|
||||
of which make him think that he didn’t know Dumbledore as well as he should have.
|
||||
Downstairs, he bids good-bye to the Dursleys for the final time, as the threat of
|
||||
Voldemort forces them to go into hiding themselves.
|
||||
@@ -0,0 +1,15 @@
|
||||
# Part 2 — Flight to the Burrow
|
||||
|
||||
## Order escort
|
||||
|
||||
The **Order of the Phoenix**, led by Alastor “Mad-Eye” **Moody**, arrives to take Harry to his new home at the **Weasleys’** house, *the Burrow*.
|
||||
|
||||
### Decoy plan
|
||||
|
||||
Six of Harry’s friends take `Polyjuice Potion` to disguise themselves as Harry and act as decoys, and they all fly off in different directions.
|
||||
|
||||
## Ambush
|
||||
|
||||
The **Death Eaters**, alerted to their departure by Snape, attack Harry and his friends. **Voldemort** chases Harry down, but Harry’s wand fends Voldemort off, seemingly without Harry’s help.
|
||||
|
||||
> End of excerpt.
|
||||
@@ -0,0 +1,6 @@
|
||||
The Order of the Phoenix, led by Alastor “Mad-Eye” Moody, arrives to take Harry to
|
||||
his new home at the Weasleys’ house, the Burrow. Six of Harry’s friends take
|
||||
Polyjuice Potion to disguise themselves as Harry and act as decoys, and they all fly
|
||||
off in different directions. The Death Eaters, alerted to their departure by Snape,
|
||||
attack Harry and his friends. Voldemort chases Harry down, but Harry’s wand fends
|
||||
Voldemort off, seemingly without Harry’s help.
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user