0

I want to build automated FAQ system where user can ask some questions and based on the questions and their answers from the training data, the application would suggest set of answers.

Can this be achieved via Prediction API? If yes, how should I create my training data?

I have tested Prediction API for sentiment analysis. But having doubts and confusion on using it as FAQ/Recommendation system.

My training data has following structure:

"Question":"How to create email account?"
"Answer":"Step1: xxxxxxxx Step2: xxxxxxxxxxxxx Step3: xxxxx xxx xxxxx"
"Question":"Who can view my contact list?"
"Answer":"xxxxxx xxxx xxxxxxxxxxxx x xxxxx xxx"

Abhinav Tyagi
  • 5,158
  • 3
  • 30
  • 60

2 Answers2

0

train your data like input is question and output is answer

when you are sending a question as a input to predict it can give output of your answer.

simple faq you will rock.

but if you completed in PHP Help me too man.

Ramdrupal7
  • 59
  • 9
0

In order to use the Prediction API, you must first train it against a set of training data. At the end of the training process, the Prediction API creates a model for your data set. Each model is either categorical (if the answer column is string) or regression (if the answer column is numeric). The model remains until you explicitly delete it. The model learns only from the original training session and any Update calls; it does not continue to learn from the Predict queries that you send to it.

Training data can be submitted in one of the following ways:

  1. A comma-separated value (CSV) file. Each row is an example consisting of a collection of data plus an answer (a category or a value) for that example, as you saw in the two data examples above. All answers in a training file must be either categorical or numeric; you cannot mix the two. After uploading the training file, you will tell the Prediction API to train against it.

  2. Training instances embedded directly into the request. The training instances can be embedded into the trainingInstances parameter. Note: due to limits on the size of an HTTP request, this would only work with small datasets (< 2 MB).

  3. Via Update calls. First an empty model is trained by passing in empty storageDataLocation and trainingInstances parameters into an Insert call. Then, the training instances are passed in using the Update call to update the empty model. Note: since not all classifiers can be updated, this may result in lower model accuracy than batch training the model on the entire dataset.

You can have more information in this Help Center article.

NB: Google Prediction API client library for PHP is still in Beta.

George
  • 1,110
  • 8
  • 17