Giter Site home page Giter Site logo

denim2x / wikia-is-answered Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 262 KB

An engaging virtual assistant service for answering (almost) any question about some event or character from the Fandom/WikiA knowledge base

License: MIT License

JavaScript 6.71% Python 79.12% HTML 5.15% CSS 9.02%
gcp google-cloud-platform dialogflow google-cloud-memorystore python3 app-engine redis custom-search-google google-custom-search-engine fandom

wikia-is-answered's Introduction

WikiA is Answered

An engaging virtual assistant service for answering (almost) any question about some event or character from the Fandom/WikiA knowledge base

Architecture

Dialogflow agent

  • welcome and fallback intents (as per default)
  • identity intent (e.g. 'To whom am I speaking?'')
  • description intent (e.g. 'Please describe yourself')
  • workflow intent (e.g. 'What may I ask about?')
  • dynamic knowledge base (new documents added as necessary)

Workflow

  • the user is greeted with an introductory message from the Dialogflow agent
  • the user may submit a message (usually a question) using the input area
  • the server sends the question to the Dialogflow agent and obtains the initial list answers (excluding the knowledge base)
  • if there are no relevant answers in the list, the query is searched in the database; if found, its associated answer is shown to the user
  • otherwise the query is sent to the Custom Search engine; a list of articles URLs is thus obtained
  • each article URL is checked for existence in the database and, if necessary, scraped and stored in plain text in the agent's knowledge base
  • the input query is then sent once again to the agent and the knowledge base answers are retrieved
  • if available, the most relevant answer is shown; otherwise the fallback message is displayed
  • this process can be repeated indefinitely

Setup

Requirements

  • Dialogflow agent restored from knowledge-agent.zip (see releases):
    • the Fandom knowledge base ('https://{0}.fandom.com/wiki/{1}') - enabled, identified by Fandom KB ID (the part after '.../editKnowledgeBase/');
  • <project root>/config.yaml with the following:
google_api:
  key: <API key>   # for Custom Search

custom_search:
  cx: <Custom Search ID>

dialogflow:
  fandom: <Fandom KB ID>

redis:
  - host: <host>
    port: <port>      # optional (default: 6379)
    auth: <password>  # optional
  - ...
  • (optional) <project root>/account.json with valid GCP service account data.

The Redis credentials are tried sequentially until the first successful database connection.

Notes

There's a significant delay during answer retrieval - caused by latencies that occur during scraping and uploading new documents into the knowledge base. There's room for improvement in that area.

MIT License

wikia-is-answered's People

Contributors

denim2x avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.