a SOTA LLM for knowledge graph construction.
3B
41 Pulls Updated 2 months ago
Updated 2 months ago
2 months ago
e36c5fec3809 · 2.4GB
model
archphi3
·
parameters3.82B
·
quantizationQ4_K_M
2.4GB
params
{"stop":["<|end|>","<|user|>","<|assistant|>"]}
78B
template
{{ if .System }}<|system|>
{{ .System }}<|end|>
{{ end }}{{ if .Prompt }}<|user|>
{{ .Prompt }}<|end|>
{{ end }}<|assistant|>
{{ .Response }}<|end|>
148B
Readme
Triplex: a SOTA LLM for knowledge graph construction.
Knowledge graphs, like Microsoft’s Graph RAG, enhance RAG methods but are expensive to build. Triplex offers a 98% cost reduction for knowledge graph creation, outperforming GPT-4 at 1/60th the cost and enabling local graph building with SciPhi’s R2R.
Triplex is a finetuned version of Phi3-3.8B for creating knowledge graphs from unstructured data developed by SciPhi.AI. It works by extracting triplets - simple statements consisting of a subject, predicate, and object - from text or other data sources.
Benchmark
Usage:
Input:
Entity Types: [ "PERSON", "ORGANIZATION", "DATE", "EVENT", "CITY", "COUNTRY", "TECHNOLOGY", "PRODUCT" ]
Predicates: [ "FOUNDED", "HEADQUARTERS", "CEO", "ACQUIRED", "DEVELOPED", "LAUNCHED", "PARTNERED WITH" ]
Text:
"Founded in 1998 by Larry Page and Sergey Brin, Google LLC is a leading global technology company headquartered in Mountain View, California. Google has developed numerous technologies, including the Android operating system, which was launched on September 23, 2008. In 2015, Google underwent a major restructuring, forming Alphabet Inc., its parent company, with Sundar Pichai as the CEO of Google. In 2017, Alphabet's subsidiary Waymo partnered with Fiat Chrysler to develop autonomous vehicles. Recently, Alphabet acquired cybersecurity company Mandiant on March 8, 2022, to enhance its cloud security offerings."
Output:
{
"entities_and_triples": [
"[1], ORGANIZATION:Google LLC",
"[2], PERSON:Larry Page",
"[3], DATE:1998",
"[1] FOUNDED [3]",
"[4], PERSON:Sergey Brin",
"[5], CITY:Mountain View",
"[6], COUNTRY:California",
"[1] HEADQUARTERS [5]",
"[7], TECHNOLOGY:Android operating system",
"[1] DEVELOPED [7]",
"[8], DATE:September 23, 2008",
"[9], ORGANIZATION:Google",
"[7] LAUNCHED [8]",
"[10], COUNTRY:India",
"[11], EVENT:Major restructuring",
"[12], DATE:2015",
"[13], ORGANIZATION:Alphabet Inc.",
"[9] PARTNERED_WITH [7]",
"[14], PERSON:Sundar Pichai",
"[13] FOUNDED [12]",
"[15], DATE:2017",
"[16], ORGANIZATION:Waymo",
"[13] CEO [9]",
"[14] CEO [9]",
"[17], COUNTRY:Japan",
"[18], ORGANIZATION:Fiat Chrysler",
"[16] PARTNERED_WITH [18]",
"[19], PRODUCT:autonomous vehicles",
"[20], DATE:March 8, 2022",
"[21], ORGANIZATION:Mandiant",
"[13] ACQUIRED [21]",
"[9] PARTNERED_WITH [21]"
]
}
Links:
- Blog: https://www.sciphi.ai/blog/triplex
- Demo: kg.sciphi.ai
- Cookbook: https://r2r-docs.sciphi.ai/cookbooks/knowledge-graph
- HuggingFace: https://huggingface.co/SciPhi/Triplex