Where can I find the docs on "question_answering"?

Hi All,

Elasticsearch added question_answering in 8.3, but I can't seem to find any documentation on how to use/test it. I've looked here: Natural language processing | Machine Learning in the Elastic Stack [8.3] | Elastic, which to me would be the most logical place to find it, but I also looked: Machine learning trained model APIs | Elasticsearch Guide [8.3] | Elastic, and this doesn't seem to mention it either. Would anyone know where I could find docs/examples on this topic? (I understand it somewhat from reading the PR, but would like to read the formal docs about it)

For inference see these docs: Infer trained model API | Elasticsearch Guide [8.3] | Elastic

For some compatible models (not exhaustive): Compatible third party NLP models | Machine Learning in the Elastic Stack [8.3] | Elastic

For how to upload the model via Eland: Machine Learning | Eland Python Client | Elastic

Or using docker instead of installing all of Eland's dependencies: GitHub - elastic/eland: Python Client and Toolkit for DataFrames, Big Data, Machine Learning and ETL in Elasticsearch

Here is an example usage:

POST _ml/trained_models/q_and_a/_infer
{
  "docs":[{ "text_field": "The Amazon rainforest (Portuguese: Floresta AmazĂ´nica or AmazĂ´nia; Spanish: Selva AmazĂłnica, AmazonĂ­a or usually Amazonia; French: ForĂŞt amazonienne; Dutch: Amazoneregenwoud), also known in English as Amazonia or the Amazon Jungle, is a moist broadleaf forest that covers most of the Amazon basin of South America. This basin encompasses 7,000,000 square kilometres (2,700,000 sq mi), of which 5,500,000 square kilometres (2,100,000 sq mi) are covered by the rainforest. This region includes territory belonging to nine nations. The majority of the forest is contained within Brazil, with 60% of the rainforest, followed by Peru with 13%, Colombia with 10%, and with minor amounts in Venezuela, Ecuador, Bolivia, Guyana, Suriname and French Guiana. States or departments in four nations contain \"Amazonas\" in their names. The Amazon represents over half of the planet's remaining rainforests, and comprises the largest and most biodiverse tract of tropical rainforest in the world, with an estimated 390 billion individual trees divided into 16,000 species."}],
  "inference_config": {
    "question_answering": {
      "question": "Which name is also used to describe the Amazon rainforest in English?"
    }
  }
}

Thanks @BenTrent for the doc links, I thought I had checked Infer trained model API | Elasticsearch Guide [8.3] | Elastic, but didn't see it. I must've either looked at an older version of the docs or am bad at ctrl+f.

1 Like