{"id":23520,"date":"2020-04-21T10:02:04","date_gmt":"2020-04-21T09:02:04","guid":{"rendered":"https:\/\/developer.kore.ai\/v7-2\/?p=23520"},"modified":"2020-04-21T10:31:15","modified_gmt":"2020-04-21T09:31:15","slug":"how-to-extract-faqs-into-knowledge-graph","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v7-2\/docs\/bots\/how-tos\/how-to-extract-faqs-into-knowledge-graph\/","title":{"rendered":"How to extract FAQs into Knowledge Graph"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>This is document details steps in building Knowledge Graph for a Banking Bot by extracting FAQs from two sources &#8211; a PDF file and a website URL.<\/p>\n<p>This page gives a step-by-step instruction for Knowledge Extraction, to build a Knowledge Graph from scratch, <a href=\"\/v7-2\/docs\/bots\/how-tos\/how-to-build-knowledge-graph\/\" target=\"_blank\" rel=\"noopener noreferrer\">refer to this document<\/a>.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Problem_Statement\">Problem Statement<\/span><\/h3>\n<ul>\n<li>The company has FAQs compiled on two formats &#8211; a PDF file and a website.<\/li>\n<li>These need to be incorporated into the Banking Bot, so users can refer in case of need.<\/li>\n<li>Knowledge Extraction process enables one to extract FAQs from multiple sources and add the same into the bot.<\/li>\n<\/ul>\n<p>For details on what Knowledge Extraction process, <a href=\"\/v7-2\/docs\/bots\/bot-builder-tool\/knowledge-task\/knowledge-extraction-service\/\" target=\"_blank\" rel=\"noopener noreferrer\">refer here<\/a>.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Prerequisites\">Prerequisites:<\/span><\/h3>\n<ul>\n<li>You must have <a href=\"\/v7-2\/docs\/bots\/getting-started\/how-to-open-bot-builder\/\">signed up<\/a> with the Kore.ai Bots Platform<\/li>\n<li>You must be aware of the basics of Bot building (refer to <a href=\"\/v7-2\/docs\/bots\/getting-started\/getting-started-bots\/\" target=\"_blank\" rel=\"noopener noreferrer\">this link<\/a>)<\/li>\n<li>You must have created a simple bot (<a href=\"\/v7-2\/docs\/bots\/chatbot-overview\/creating-a-simple-bot\/\">refer here<\/a> for an example)<\/li>\n<li>You must have basic knowledge about Kore.ai&#8217;s Knowledge Graph (<a href=\"\/v7-2\/docs\/bots\/bot-builder-tool\/knowledge-task\/knowledge-ontology\/\" target=\"_blank\" rel=\"noopener noreferrer\">refer here<\/a>)<\/li>\n<li>You must have access to a PDF file with question and answers.<\/li>\n<li>You must have access to a website URL with question and answers.<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Step_1_Knowledge_Graph\">Step 1: Knowledge Graph<\/span><\/h3>\n<p>Using Knowledge Graph, bots can provide answers to your user questions by querying a predefined set of FAQs. Knowledge Extraction service can be used to quickly pull FAQs from web pages and documents.<\/p>\n<ul>\n<li>Open the Bot to which the Knowledge Graph needs to be build, here we are using <a href=\"\/v7-2\/docs\/bots\/how-tos\/creating-a-banking-bot\/\" target=\"_blank\" rel=\"noopener noreferrer\">Banking Bot<\/a>.<\/li>\n<li>From <strong>Bot Tasks<\/strong> section, click <strong>Knowledge Graph<\/strong> to access the same.<\/li>\n<li>In the <strong>Knowledge Graph<\/strong> displayed, you can find under the\u00a0<strong>Extracts<\/strong> section two options Extract from file and Extract from URL.<\/li>\n<li>We will be using both the options for this use case.<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/KGE_blank.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23521\" src=\"\/wp-content\/uploads\/sites\/13\/KGE_blank.png\" alt=\"\" width=\"1365\" height=\"607\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095005\/KGE_blank.png 1365w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095005\/KGE_blank-300x133.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095005\/KGE_blank-1024x455.png 1024w\" sizes=\"auto, (max-width: 1365px) 100vw, 1365px\" \/><\/a><\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Step_2_Extract_FAQs\">Step 2: Extract FAQs<\/span><\/h3>\n<p>Using Extract from file option you can pull FAQs from a document.<\/p>\n<ul>\n<li>Click\u00a0<strong>Extract from file<\/strong> option.<\/li>\n<li>Drag and drop or Browse and select the file you want to Extract from, enter a <strong>Name<\/strong>, and click\u00a0<strong>Proceed<\/strong>.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/KGE_extract_file.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23523\" src=\"\/wp-content\/uploads\/sites\/13\/KGE_extract_file.png\" alt=\"\" width=\"891\" height=\"525\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095004\/KGE_extract_file.png 891w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095004\/KGE_extract_file-300x177.png 300w\" sizes=\"auto, (max-width: 891px) 100vw, 891px\" \/><\/a><\/li>\n<li>Repeat the steps for\u00a0<strong>Extract from URL<\/strong> option.<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/KGE_extract_web.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23522\" src=\"\/wp-content\/uploads\/sites\/13\/KGE_extract_web.png\" alt=\"\" width=\"893\" height=\"541\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095004\/KGE_extract_web.png 893w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095004\/KGE_extract_web-300x182.png 300w\" sizes=\"auto, (max-width: 893px) 100vw, 893px\" \/><\/a><\/li>\n<li>As you can see from the Extracts section there are two extracts with the questions to be reviewed and added to the Knowledge Graph.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/KGE_extracts.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23533\" src=\"\/wp-content\/uploads\/sites\/13\/KGE_extracts.png\" alt=\"\" width=\"887\" height=\"383\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095001\/KGE_extracts.png 887w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095001\/KGE_extracts-300x130.png 300w\" sizes=\"auto, (max-width: 887px) 100vw, 887px\" \/><\/a><\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Step_3_Add_FAQs\">Step 3: Add FAQs<\/span><\/h3>\n<p>Before adding the questions to the Knowledge Graph, let us create two appropriate nodes to add questions to. Since our FAQs are related to Internet Banking and ATM Usage we created two such nodes:<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/KGE_nodes.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23524\" src=\"\/wp-content\/uploads\/sites\/13\/KGE_nodes.png\" alt=\"\" width=\"453\" height=\"294\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095004\/KGE_nodes.png 453w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095004\/KGE_nodes-300x195.png 300w\" sizes=\"auto, (max-width: 453px) 100vw, 453px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>There are two ways to add questions, we will look at each one of them here<\/p>\n<ul>\n<li>From the Extracts page, click on the\u00a0<strong>Review &amp; Add<\/strong> link against the extract you want to add from, here we are selecting the ATM Usage extract.\n<ul>\n<li>This will open the FAQ list along with the Knowledge Graph ontology.<\/li>\n<li>Select the questions you want to add.<\/li>\n<li>Drag and drop into the corresponding node.<\/li>\n<li>Notice the question count updated &#8211; Added vs Not added.<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/KGE_extract_addNode.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23525\" src=\"\/wp-content\/uploads\/sites\/13\/KGE_extract_addNode.png\" alt=\"\" width=\"1359\" height=\"515\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095004\/KGE_extract_addNode.png 1359w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095004\/KGE_extract_addNode-300x114.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095004\/KGE_extract_addNode-1024x388.png 1024w\" sizes=\"auto, (max-width: 1359px) 100vw, 1359px\" \/><\/a><\/li>\n<li>Return to the Bot Tasks page.<\/li>\n<li>Click on the Knowledge Graph to open the page.\n<ul>\n<li>Select the node to which you want to add the questions and click the\u00a0<strong>Add from extraction<\/strong> link.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/KGE_nodes_add.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23526\" src=\"\/wp-content\/uploads\/sites\/13\/KGE_nodes_add.png\" alt=\"\" width=\"1361\" height=\"469\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095003\/KGE_nodes_add.png 1361w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095003\/KGE_nodes_add-300x103.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095003\/KGE_nodes_add-1024x353.png 1024w\" sizes=\"auto, (max-width: 1361px) 100vw, 1361px\" \/><\/a><\/li>\n<li>Select the\u00a0<strong>Extract<\/strong> from which you want to add the questions, Internet Banking in this example.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/KGE_nodes_extract.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23527\" src=\"\/wp-content\/uploads\/sites\/13\/KGE_nodes_extract.png\" alt=\"\" width=\"981\" height=\"293\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095003\/KGE_nodes_extract.png 981w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095003\/KGE_nodes_extract-300x90.png 300w\" sizes=\"auto, (max-width: 981px) 100vw, 981px\" \/><\/a><\/li>\n<li>Select the questions you want to add and click\u00a0<strong>Add<\/strong><br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/KGE_nodes_selectQa.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23528\" src=\"\/wp-content\/uploads\/sites\/13\/KGE_nodes_selectQa.png\" alt=\"\" width=\"1363\" height=\"765\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095002\/KGE_nodes_selectQa.png 1363w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095002\/KGE_nodes_selectQa-300x168.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095002\/KGE_nodes_selectQa-1024x575.png 1024w\" sizes=\"auto, (max-width: 1363px) 100vw, 1363px\" \/><\/a><\/li>\n<li><strong>Close<\/strong> the questions page and return to the Knowledge Graph page.<\/li>\n<\/ul>\n<\/li>\n<li>Now when you select the Knowledge Graph, you can see the added question in their respective paths.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/KGE_collection.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23530\" src=\"\/wp-content\/uploads\/sites\/13\/KGE_collection.png\" alt=\"\" width=\"1363\" height=\"761\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095002\/KGE_collection.png 1363w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095002\/KGE_collection-300x167.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095002\/KGE_collection-1024x572.png 1024w\" sizes=\"auto, (max-width: 1363px) 100vw, 1363px\" \/><\/a><\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"This is document details steps in building Knowledge Graph for a Banking Bot by extracting FAQs from two sources - a PDF file and a website URL. This page gives a step-by-step instruction for Knowledge Extraction, to build a Knowledge Graph from scratch, refer to this document. Problem Statement The company has FAQs compiled on...","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74],"tags":[],"class_list":["post-23520","post","type-post","status-publish","format-standard","hentry","category-how-tos"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts\/23520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/comments?post=23520"}],"version-history":[{"count":4,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts\/23520\/revisions"}],"predecessor-version":[{"id":23534,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts\/23520\/revisions\/23534"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/media?parent=23520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/categories?post=23520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/tags?post=23520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}