{"id":2138,"date":"2026-05-26T08:42:09","date_gmt":"2026-05-26T08:42:09","guid":{"rendered":"https:\/\/opengovai4d.ellak.gr\/?page_id=2138"},"modified":"2026-05-27T14:17:22","modified_gmt":"2026-05-27T14:17:22","slug":"knowledge-graph","status":"publish","type":"page","link":"https:\/\/opengovai4d.ellak.gr\/en\/knowledge-graph\/","title":{"rendered":"Knowledge Graph"},"content":{"rendered":"<div class=\"wp-block-group alignwide is-layout-flow wp-block-group-is-layout-flow\" style=\"padding-top:24px;padding-bottom:48px\">\n<p class=\"has-custom-primary-color has-text-color has-link-color wp-elements-cb0540b6b50225f598a9f3fafd2f2754 wp-block-paragraph\" style=\"font-size:clamp(27.894px, 1.743rem + ((1vw - 3.2px) * 2.094), 48px);\">Knowledge Graph<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Knowledge Graph AI4Deliberation models public consultations as a structured IBIS (Issue-Based Information System) hierarchy: The Consultations contain Articles (legislative provisions), which accept Citizens' Positions (proposed amendments), each supported by Arguments. Analyses extracted via LLM from several consultation datasets are converted via an ETL pipeline into RDF triples stored in a Virtuoso triple store. A multi-agent RAG service (Translator \u2192 Validator \u2192 Narrator) answers natural language questions by creating and running SPARQL queries on this graph.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group alignfull has-base-2-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-32c6f11a wp-block-group-is-layout-constrained\" style=\"border-top-color:#b3b2b5;border-top-width:1px;padding-top:50px;padding-right:0px;padding-bottom:50px;padding-left:0px\">\n<div class=\"wp-block-group alignwide is-layout-flow wp-block-group-is-layout-flow\">\n<p class=\"has-text-align-center wp-block-paragraph\" style=\"font-size:clamp(22.041px, 1.378rem + ((1vw - 3.2px) * 1.454), 36px);\"><strong>How it works <mark style=\"background-color:#ffdd00\" class=\"has-inline-color\">Knowledge Graph<\/mark>;<\/strong><\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Data<\/strong><br>The source is Greek consultation data, which consists of several SQLite databases, one per legislative article. Each database contains comments from citizens processed in advance by a tool, which extracted a structured JSON from each comment: a list of posts (proposed amendments with amendment _type: addition, removal, modification or suggestion) and arguments by location (each with polarity: positive, negative or neutral).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><strong>2. ETL Pipeline<\/strong><br>The pipeline is run in two phases:<br><strong>Export:<\/strong> It reads every SQLite database and analyzes JSON. Maintains full nested structure: consultation \u2192 article \u2192 comment \u2192 positions \u2192 arguments. Articles and consultations metadata (titles, ministry, dates) are searched by the main consultation data source.<br><strong>Transformation:<\/strong> Converts the extracted data to RDF triads using the IBIS ontology:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Every Consultation and Article becomes an ibis:Issue hub<\/li>\n\n\n\n<li>ibis:questions links a Consultation to each of its Articles<\/li>\n\n\n\n<li>Each exported position becomes ibis:Position with ibis:respondsTo showing in its Article<\/li>\n\n\n\n<li>Posts with amendment _type: removal or modification also acquire ibis:objectsTo \u2192 Article<\/li>\n\n\n\n<li>Each argument becomes ibis:Argument with ibis:supports or ibis:objectsTo showing in its Position<\/li>\n\n\n\n<li>Initial citizen comments are kept as og:Comment nodes connected back to locations via og:extractedFrom<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. Save Knowledge Graph<\/strong><br>The pipeline serializes the graph in ttl file format. This Turtle file is loaded into a Virtuoso triple store, which exposes a SPARQL 1.1 endpoint.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><strong>4. RAG service<\/strong><br>A FastAPI service wraps a pipeline of three agents powered by LLMs:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Translator's Agent:<\/strong> It takes the user's natural language question (along with conversation history) and generates a SPARQL query following the IBIS transit rules.<\/li>\n\n\n\n<li><strong>Agent Validator:<\/strong> It checks the generated SPARQL for structural correctness, such as valid prefixes, valid properties, correct multi-step crossing, without false predications, and either approves it or returns a correction.<\/li>\n\n\n\n<li><strong>Agent Narrator:<\/strong> Performs the validated query in Virtuoso, receives the raw result lines and composes a coherent natural language answer in Greek or English depending on the question.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>5. User Interaction<\/strong><br>Users submit a question (with optional chat history) to the endpoint. The three agents are executed sequentially. If the query does not return results, Narrator clearly states it instead of inventing an answer. Multi-round conversations are supported by transferring previous pairs (question, answer) with each request.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"337\" src=\"https:\/\/opengovai4d.ellak.gr\/wp-content\/uploads\/2026\/05\/architecture2-1024x337.png\" alt=\"\" class=\"wp-image-2143\" srcset=\"https:\/\/opengovai4d.ellak.gr\/wp-content\/uploads\/2026\/05\/architecture2-1024x337.png 1024w, https:\/\/opengovai4d.ellak.gr\/wp-content\/uploads\/2026\/05\/architecture2-300x99.png 300w, https:\/\/opengovai4d.ellak.gr\/wp-content\/uploads\/2026\/05\/architecture2-768x253.png 768w, https:\/\/opengovai4d.ellak.gr\/wp-content\/uploads\/2026\/05\/architecture2-18x6.png 18w, https:\/\/opengovai4d.ellak.gr\/wp-content\/uploads\/2026\/05\/architecture2-50x16.png 50w, https:\/\/opengovai4d.ellak.gr\/wp-content\/uploads\/2026\/05\/architecture2-100x33.png 100w, https:\/\/opengovai4d.ellak.gr\/wp-content\/uploads\/2026\/05\/architecture2.png 1081w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Knowledge Graph AI4Deliberation models public consultations as a structured IBIS (Issue-Based Information System) hierarchy: The Consultations contain Articles (legislative provisions), which accept Citizens' Positions (proposed amendments), each supported by Arguments. Analyses extracted via LLM from several consultation datasets are converted via an ETL pipeline into RDF triads stored in [\u2026]<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"wp-custom-template-different-header","meta":{"_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-2138","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"etm-custom-language-flag":false,"gamipress-points":false,"gamipress-achievement":false,"gamipress-rank":false},"uagb_author_info":{"display_name":"admin","author_link":"https:\/\/opengovai4d.ellak.gr\/en\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"Knowledge Graph \u03a4\u03bf Knowledge Graph AI4Deliberation \u03bc\u03bf\u03bd\u03c4\u03b5\u03bb\u03bf\u03c0\u03bf\u03b9\u03b5\u03af \u03b4\u03b7\u03bc\u03cc\u03c3\u03b9\u03b5\u03c2 \u03b4\u03b9\u03b1\u03b2\u03bf\u03c5\u03bb\u03b5\u03cd\u03c3\u03b5\u03b9\u03c2 \u03c9\u03c2 \u03bc\u03b9\u03b1 \u03b4\u03bf\u03bc\u03b7\u03bc\u03ad\u03bd\u03b7 \u03b9\u03b5\u03c1\u03b1\u03c1\u03c7\u03af\u03b1 IBIS (Issue-Based Information System): \u039f\u03b9 \u0394\u03b9\u03b1\u03b2\u03bf\u03c5\u03bb\u03b5\u03cd\u03c3\u03b5\u03b9\u03c2 \u03c0\u03b5\u03c1\u03b9\u03ad\u03c7\u03bf\u03c5\u03bd \u0386\u03c1\u03b8\u03c1\u03b1 (\u03bd\u03bf\u03bc\u03bf\u03b8\u03b5\u03c4\u03b9\u03ba\u03ad\u03c2 \u03b4\u03b9\u03b1\u03c4\u03ac\u03be\u03b5\u03b9\u03c2), \u03c4\u03b1 \u03bf\u03c0\u03bf\u03af\u03b1 \u03b4\u03ad\u03c7\u03bf\u03bd\u03c4\u03b1\u03b9 \u0398\u03ad\u03c3\u03b5\u03b9\u03c2 \u03c0\u03bf\u03bb\u03b9\u03c4\u03ce\u03bd (\u03c0\u03c1\u03bf\u03c4\u03b5\u03b9\u03bd\u03cc\u03bc\u03b5\u03bd\u03b5\u03c2 \u03c4\u03c1\u03bf\u03c0\u03bf\u03bb\u03bf\u03b3\u03af\u03b5\u03c2), \u03b7 \u03ba\u03b1\u03b8\u03b5\u03bc\u03af\u03b1 \u03c5\u03c0\u03bf\u03c3\u03c4\u03b7\u03c1\u03b9\u03b6\u03cc\u03bc\u03b5\u03bd\u03b7 \u03b1\u03c0\u03cc \u0395\u03c0\u03b9\u03c7\u03b5\u03b9\u03c1\u03ae\u03bc\u03b1\u03c4\u03b1. \u0391\u03bd\u03b1\u03bb\u03cd\u03c3\u03b5\u03b9\u03c2 \u03c0\u03bf\u03c5 \u03b5\u03be\u03ae\u03c7\u03b8\u03b7\u03c3\u03b1\u03bd \u03bc\u03ad\u03c3\u03c9 LLM \u03b1\u03c0\u03cc \u03b1\u03c1\u03ba\u03b5\u03c4\u03ac \u03c3\u03cd\u03bd\u03bf\u03bb\u03b1 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd \u03b4\u03b9\u03b1\u03b2\u03bf\u03c5\u03bb\u03b5\u03cd\u03c3\u03b5\u03c9\u03bd \u03bc\u03b5\u03c4\u03b1\u03c4\u03c1\u03ad\u03c0\u03bf\u03bd\u03c4\u03b1\u03b9 \u03bc\u03ad\u03c3\u03c9 \u03b5\u03bd\u03cc\u03c2 ETL pipeline \u03c3\u03b5 RDF \u03c4\u03c1\u03b9\u03ac\u03b4\u03b5\u03c2 \u03b1\u03c0\u03bf\u03b8\u03b7\u03ba\u03b5\u03c5\u03bc\u03ad\u03bd\u03b5\u03c2 \u03c3\u03b5&hellip;","_links":{"self":[{"href":"https:\/\/opengovai4d.ellak.gr\/en\/wp-json\/wp\/v2\/pages\/2138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opengovai4d.ellak.gr\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/opengovai4d.ellak.gr\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/opengovai4d.ellak.gr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/opengovai4d.ellak.gr\/en\/wp-json\/wp\/v2\/comments?post=2138"}],"version-history":[{"count":5,"href":"https:\/\/opengovai4d.ellak.gr\/en\/wp-json\/wp\/v2\/pages\/2138\/revisions"}],"predecessor-version":[{"id":2177,"href":"https:\/\/opengovai4d.ellak.gr\/en\/wp-json\/wp\/v2\/pages\/2138\/revisions\/2177"}],"wp:attachment":[{"href":"https:\/\/opengovai4d.ellak.gr\/en\/wp-json\/wp\/v2\/media?parent=2138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}