{"id":{"repo_id":"unitec","oai_identifier":"oai:null:10652/7151"},"canonical_url":"https://search.ndltd.org/etd/unitec/oai:null:10652/7151","repository":{"repo_id":"unitec","name":"Unitec","base_url":"https://www.researchbank.ac.nz/server/oai/request"},"display":{"title":"Enhancing RAG agent performance through structured knowledge bases from NLP-parsed data warehouses","abstract":"Enterprise teams need correct, explainable answers from governed data warehouses (DWs), but Natural-Language-to-SQL (NL2SQL) systems often fail when schemas evolve, con straints are complex, and policies must be enforced consistently. Current RAG-only approaches and unconstrained NL2SQL do not reliably enumerate eligible options or enforce procurement policies under schema change. In ten controlled IT procurement user cases, schema-aware execution recovered the full budget-compliant device pools and enforced auto-approval rules with 0% violations, while a RAG-only baseline omitted eligible devices and occasionally exceeded budget at rank 1. This thesis investigates how a schema-aware hybrid pipeline can provide grounded, auditable answers for budget constrained and policy-constrained IT procurement decisions over a realistic warehouse slice. The proposed design scopes each interaction to a safe, read-only query surface, retrieves schema and policy context, and generates a single validated SELECT statement. It combines dense vector retrieval over documentation and metadata with a Qdrant index, a lightweight knowledge graph for entity and relationship hints, and a per-session PostgreSQL warehouse slice that encodes request budgets and departmental auto-approval rules. To assess effectiveness, three pipelines are implemented and compared: a RAG-only pipeline that answers directly from retrieved text; a SQL-only pipeline that queries the session warehouse through a fixed, validated SELECT template; and the proposed Hybrid pipeline that couples semantic retrieval with constrained, warehouse-backed execution. Using ten controlled user cases (A–J) spanning departments, roles, quarters, and new versus replacement requests, the evaluation measures (Q1) correctness of the returned budget-fitting device pool and (Q2) correctness and efficiency of standard auto-approvable shortlists. Against a deterministic SQL baseline, the SQL-only and Hybrid pipelines recovered the exact Q1 device sets for all cases (65 devices total), while the RAG-only pipeline returned 49 devices and matched the expected set in 2 of 10 cases (mean absolute count error 1.6). Top-1 budget compliance was 10 of 10 cases for the SQL-only and Hybrid pipelines and 8 of 10 for the RAG-only pipeline. For Q2, only the SQL-backed pipelines (Experiments 2 and 3) were evaluated because auto-approval is represented as governed warehouse attributes (for example, auto approve ok) that Experiment 1 cannot access or enforce reliably from text alone; both SQL-only and Hybrid matched the baseline auto-approved pools in all cases and returned 0% of devices that were outside budget or not auto-approved. Although they return identical Q2 decisions, compared with SQL-only, the Hybrid pipeline reduced median end-to-end latency from 9.45s to 5.77s and median total tokens from 7,457 to 3,656 (about 51% lower). These results show that constraining generation to a schema-scoped and policy-scoped context can deliver accurate, constraint-respecting answers at lower operational cost, without sacrificing auditability. The thesis contributes: (i) a governance-first NL2SQL pattern with static name, join, type, and policy checks plus evidence tracing; (ii) an empirical comparison of RAG-only, SQL-only, and Hybrid pipelines on a realistic IT procurement workload; and (iii) reusable per-session design patterns for organisations seeking to deploy schema-aware RAG in regulated, data-intensive environments.","abstract_html":"Enterprise teams need correct, explainable answers from governed data warehouses (DWs), but Natural-Language-to-SQL (NL2SQL) systems often fail when schemas evolve, con straints are complex, and policies must be enforced consistently. Current RAG-only approaches and unconstrained NL2SQL do not reliably enumerate eligible options or enforce procurement policies under schema change. In ten controlled IT procurement user cases, schema-aware execution recovered the full budget-compliant device pools and enforced auto-approval rules with 0% violations, while a RAG-only baseline omitted eligible devices and occasionally exceeded budget at rank 1. This thesis investigates how a schema-aware hybrid pipeline can provide grounded, auditable answers for budget constrained and policy-constrained IT procurement decisions over a realistic warehouse slice. The proposed design scopes each interaction to a safe, read-only query surface, retrieves schema and policy context, and generates a single validated SELECT statement. It combines dense vector retrieval over documentation and metadata with a Qdrant index, a lightweight knowledge graph for entity and relationship hints, and a per-session PostgreSQL warehouse slice that encodes request budgets and departmental auto-approval rules. To assess effectiveness, three pipelines are implemented and compared: a RAG-only pipeline that answers directly from retrieved text; a SQL-only pipeline that queries the session warehouse through a fixed, validated SELECT template; and the proposed Hybrid pipeline that couples semantic retrieval with constrained, warehouse-backed execution. Using ten controlled user cases (A–J) spanning departments, roles, quarters, and new versus replacement requests, the evaluation measures (Q1) correctness of the returned budget-fitting device pool and (Q2) correctness and efficiency of standard auto-approvable shortlists. Against a deterministic SQL baseline, the SQL-only and Hybrid pipelines recovered the exact Q1 device sets for all cases (65 devices total), while the RAG-only pipeline returned 49 devices and matched the expected set in 2 of 10 cases (mean absolute count error 1.6). Top-1 budget compliance was 10 of 10 cases for the SQL-only and Hybrid pipelines and 8 of 10 for the RAG-only pipeline. For Q2, only the SQL-backed pipelines (Experiments 2 and 3) were evaluated because auto-approval is represented as governed warehouse attributes (for example, auto approve ok) that Experiment 1 cannot access or enforce reliably from text alone; both SQL-only and Hybrid matched the baseline auto-approved pools in all cases and returned 0% of devices that were outside budget or not auto-approved. Although they return identical Q2 decisions, compared with SQL-only, the Hybrid pipeline reduced median end-to-end latency from 9.45s to 5.77s and median total tokens from 7,457 to 3,656 (about 51% lower). These results show that constraining generation to a schema-scoped and policy-scoped context can deliver accurate, constraint-respecting answers at lower operational cost, without sacrificing auditability. The thesis contributes: (i) a governance-first NL2SQL pattern with static name, join, type, and policy checks plus evidence tracing; (ii) an empirical comparison of RAG-only, SQL-only, and Hybrid pipelines on a realistic IT procurement workload; and (iii) reusable per-session design patterns for organisations seeking to deploy schema-aware RAG in regulated, data-intensive environments.","abstract_has_math":false,"creators":["Nguyen, Duc Phu"],"institution":"Unitec","degree_name":"Master of Applied Technologies","degree_level":"Masters","degree_discipline":null,"degree_department":null,"school":null,"contributors":[],"advisors":["Sharifzadeh, Hamid","Song, Lei"],"committee_chairs":[],"committee_members":[],"year":2026,"date_issued":"2026","date_published":"2026","updated_at":"2026-11-26T14:13:46Z","subjects":["intelligent agents (computer software)","SQL (computer program language)","retrieval-augmented generation (RAG)","natural language processing (computer science)","PostgreSQL","query languages (computer science)","data warehousing","procurement","AI in business"],"languages":["en"],"rights":["All rights reserved","Author"],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["Nguyen, D.P. (2026) Enhancing RAG agent performance through structured knowledge bases from NLP-parsed data warehouses (Unpublished document submitted in partial fulfilment of the requirements for the degree of Master of Applied Technologies (Computing)). Unitec. https://hdl.handle.net/10652/7151"],"render_values":[{"text":"Nguyen, D.P. (2026) Enhancing RAG agent performance through structured knowledge bases from NLP-parsed data warehouses (Unpublished document submitted in partial fulfilment of the requirements for the degree of Master of Applied Technologies (Computing)). Unitec. https://hdl.handle.net/10652/7151","href":null,"code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/10652/7151","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/10652/7151","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Aunitec%3Aoai%3Anull%3A10652%2F7151","prefix":"oai_dc"},"source_record":{"url":"https://www.researchbank.ac.nz/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Anull%3A10652%2F7151","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Sharifzadeh, Hamid","Song, Lei"]},{"key":"dc:creator","label":"Author","values":["Nguyen, Duc Phu"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2026-03-02T22:14:14Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2026-03-02T22:14:14Z"]},{"key":"dc:date.issued","label":"Date","values":["2026"]},{"key":"dc:type","label":"Dc Type","values":["Masters Thesis"]},{"key":"thesis:degree_level","label":"Degree Level","values":["Masters"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Applied Technologies"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["Unitec"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["intelligent agents (computer software)","SQL (computer program language)","retrieval-augmented generation (RAG)","natural language processing (computer science)","PostgreSQL","query languages (computer science)","data warehousing","procurement","AI in business"]},{"key":"dc:subject.discipline","label":"Dc Subject Discipline","values":["Applied Technologies"]},{"key":"dc:subject.marsden","label":"Dc Subject Marsden","values":["ANZSRC Fields of Research 2020::46 Information and computing sciences::4602 Artificial intelligence::460208 Natural language processing","ANZSRC Fields of Research 2020::46 Information and computing sciences::4612 Software engineering","ANZSRC Fields of Research 2020::46 Information and computing sciences::4602 Artificial intelligence","ANZSRC Fields of Research 2020::35 Commerce, management, tourism and services::3503 Business systems in context::350302 Business information management (incl. records, knowledge and intelligence)"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]},{"key":"dc:rights","label":"Dc Rights","values":["All rights reserved"]},{"key":"dc:rights.holder","label":"Dc Rights Holder","values":["Author"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["Nguyen, D.P. (2026) Enhancing RAG agent performance through structured knowledge bases from NLP-parsed data warehouses (Unpublished document submitted in partial fulfilment of the requirements for the degree of Master of Applied Technologies (Computing)). Unitec. https://hdl.handle.net/10652/7151"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/10652/7151"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Enterprise teams need correct, explainable answers from governed data warehouses (DWs), but Natural-Language-to-SQL (NL2SQL) systems often fail when schemas evolve, con straints are complex, and policies must be enforced consistently. Current RAG-only approaches and unconstrained NL2SQL do not reliably enumerate eligible options or enforce procurement policies under schema change. In ten controlled IT procurement user cases, schema-aware execution recovered the full budget-compliant device pools and enforced auto-approval rules with 0% violations, while a RAG-only baseline omitted eligible devices and occasionally exceeded budget at rank 1. This thesis investigates how a schema-aware hybrid pipeline can provide grounded, auditable answers for budget constrained and policy-constrained IT procurement decisions over a realistic warehouse slice. The proposed design scopes each interaction to a safe, read-only query surface, retrieves schema and policy context, and generates a single validated SELECT statement. It combines dense vector retrieval over documentation and metadata with a Qdrant index, a lightweight knowledge graph for entity and relationship hints, and a per-session PostgreSQL warehouse slice that encodes request budgets and departmental auto-approval rules. To assess effectiveness, three pipelines are implemented and compared: a RAG-only pipeline that answers directly from retrieved text; a SQL-only pipeline that queries the session warehouse through a fixed, validated SELECT template; and the proposed Hybrid pipeline that couples semantic retrieval with constrained, warehouse-backed execution. Using ten controlled user cases (A–J) spanning departments, roles, quarters, and new versus replacement requests, the evaluation measures (Q1) correctness of the returned budget-fitting device pool and (Q2) correctness and efficiency of standard auto-approvable shortlists. Against a deterministic SQL baseline, the SQL-only and Hybrid pipelines recovered the exact Q1 device sets for all cases (65 devices total), while the RAG-only pipeline returned 49 devices and matched the expected set in 2 of 10 cases (mean absolute count error 1.6). Top-1 budget compliance was 10 of 10 cases for the SQL-only and Hybrid pipelines and 8 of 10 for the RAG-only pipeline. For Q2, only the SQL-backed pipelines (Experiments 2 and 3) were evaluated because auto-approval is represented as governed warehouse attributes (for example, auto approve ok) that Experiment 1 cannot access or enforce reliably from text alone; both SQL-only and Hybrid matched the baseline auto-approved pools in all cases and returned 0% of devices that were outside budget or not auto-approved. Although they return identical Q2 decisions, compared with SQL-only, the Hybrid pipeline reduced median end-to-end latency from 9.45s to 5.77s and median total tokens from 7,457 to 3,656 (about 51% lower). These results show that constraining generation to a schema-scoped and policy-scoped context can deliver accurate, constraint-respecting answers at lower operational cost, without sacrificing auditability. The thesis contributes: (i) a governance-first NL2SQL pattern with static name, join, type, and policy checks plus evidence tracing; (ii) an empirical comparison of RAG-only, SQL-only, and Hybrid pipelines on a realistic IT procurement workload; and (iii) reusable per-session design patterns for organisations seeking to deploy schema-aware RAG in regulated, data-intensive environments."]},{"key":"dc:format.extent","label":"Dc Format Extent","values":["164"]},{"key":"dc:title","label":"Title","values":["Enhancing RAG agent performance through structured knowledge bases from NLP-parsed data warehouses"]},{"key":"local:contributor.affiliation","label":"Local Contributor Affiliation","values":["Unitec"]}]}],"canonical_facts":{"dc:contributor.advisor":["Sharifzadeh, Hamid","Song, Lei"],"dc:creator":["Nguyen, Duc Phu"],"dc:date.accessioned":["2026-03-02T22:14:14Z"],"dc:date.available":["2026-03-02T22:14:14Z"],"dc:date.issued":["2026"],"dc:description.abstract":["Enterprise teams need correct, explainable answers from governed data warehouses (DWs), but Natural-Language-to-SQL (NL2SQL) systems often fail when schemas evolve, con straints are complex, and policies must be enforced consistently. Current RAG-only approaches and unconstrained NL2SQL do not reliably enumerate eligible options or enforce procurement policies under schema change. In ten controlled IT procurement user cases, schema-aware execution recovered the full budget-compliant device pools and enforced auto-approval rules with 0% violations, while a RAG-only baseline omitted eligible devices and occasionally exceeded budget at rank 1. This thesis investigates how a schema-aware hybrid pipeline can provide grounded, auditable answers for budget constrained and policy-constrained IT procurement decisions over a realistic warehouse slice. The proposed design scopes each interaction to a safe, read-only query surface, retrieves schema and policy context, and generates a single validated SELECT statement. It combines dense vector retrieval over documentation and metadata with a Qdrant index, a lightweight knowledge graph for entity and relationship hints, and a per-session PostgreSQL warehouse slice that encodes request budgets and departmental auto-approval rules. To assess effectiveness, three pipelines are implemented and compared: a RAG-only pipeline that answers directly from retrieved text; a SQL-only pipeline that queries the session warehouse through a fixed, validated SELECT template; and the proposed Hybrid pipeline that couples semantic retrieval with constrained, warehouse-backed execution. Using ten controlled user cases (A–J) spanning departments, roles, quarters, and new versus replacement requests, the evaluation measures (Q1) correctness of the returned budget-fitting device pool and (Q2) correctness and efficiency of standard auto-approvable shortlists. Against a deterministic SQL baseline, the SQL-only and Hybrid pipelines recovered the exact Q1 device sets for all cases (65 devices total), while the RAG-only pipeline returned 49 devices and matched the expected set in 2 of 10 cases (mean absolute count error 1.6). Top-1 budget compliance was 10 of 10 cases for the SQL-only and Hybrid pipelines and 8 of 10 for the RAG-only pipeline. For Q2, only the SQL-backed pipelines (Experiments 2 and 3) were evaluated because auto-approval is represented as governed warehouse attributes (for example, auto approve ok) that Experiment 1 cannot access or enforce reliably from text alone; both SQL-only and Hybrid matched the baseline auto-approved pools in all cases and returned 0% of devices that were outside budget or not auto-approved. Although they return identical Q2 decisions, compared with SQL-only, the Hybrid pipeline reduced median end-to-end latency from 9.45s to 5.77s and median total tokens from 7,457 to 3,656 (about 51% lower). These results show that constraining generation to a schema-scoped and policy-scoped context can deliver accurate, constraint-respecting answers at lower operational cost, without sacrificing auditability. The thesis contributes: (i) a governance-first NL2SQL pattern with static name, join, type, and policy checks plus evidence tracing; (ii) an empirical comparison of RAG-only, SQL-only, and Hybrid pipelines on a realistic IT procurement workload; and (iii) reusable per-session design patterns for organisations seeking to deploy schema-aware RAG in regulated, data-intensive environments."],"dc:format.extent":["164"],"dc:identifier.citation":["Nguyen, D.P. (2026) Enhancing RAG agent performance through structured knowledge bases from NLP-parsed data warehouses (Unpublished document submitted in partial fulfilment of the requirements for the degree of Master of Applied Technologies (Computing)). Unitec. https://hdl.handle.net/10652/7151"],"dc:identifier.uri":["https://hdl.handle.net/10652/7151"],"dc:language.iso":["en"],"dc:rights":["All rights reserved"],"dc:rights.holder":["Author"],"dc:subject":["intelligent agents (computer software)","SQL (computer program language)","retrieval-augmented generation (RAG)","natural language processing (computer science)","PostgreSQL","query languages (computer science)","data warehousing","procurement","AI in business"],"dc:subject.discipline":["Applied Technologies"],"dc:subject.marsden":["ANZSRC Fields of Research 2020::46 Information and computing sciences::4602 Artificial intelligence::460208 Natural language processing","ANZSRC Fields of Research 2020::46 Information and computing sciences::4612 Software engineering","ANZSRC Fields of Research 2020::46 Information and computing sciences::4602 Artificial intelligence","ANZSRC Fields of Research 2020::35 Commerce, management, tourism and services::3503 Business systems in context::350302 Business information management (incl. records, knowledge and intelligence)"],"dc:title":["Enhancing RAG agent performance through structured knowledge bases from NLP-parsed data warehouses"],"dc:type":["Masters Thesis"],"local:contributor.affiliation":["Unitec"],"thesis:degree_level":["Masters"],"thesis:degree_name":["Master of Applied Technologies"],"thesis:institution_name":["Unitec"]},"updated_at":"2026-11-26T14:13:46Z"}