1. A non-transitory computer-readable medium storing instructions executable by one or more computers which, upon such execution, cause the one or more computers to perform operations comprising: receiving, at a server, a query identifying one or more attributes of an entity; accessing, at the server, a set of candidate templates for answering the query based on the one or more attributes of the entity, each candidate template having one or more fields, wherein each field is associated with at least one constraint; obtaining, at the server, a set of information that answers the query; selecting, at the server and from among the set of candidate templates, a template from which to generate a phrase that comprises an answer to the query, the selected template selected based on a determination that the selected template has a maximum number of fields with constraints that are satisfied by the set of information, in that no other template in the set of candidate templates has more fields with constraints that are satisfied by the set of information than the maximum number of fields of the selected template; generating, at the server, the phrase by adding the set of information to the one or more fields of the selected template, such that the phrase comprises an answer to the query; and communicating, from the server, the phrase to a client device.
6. The computer-readable medium of claim 1 , wherein receiving, at a server, a query identifying one or more attributes of an entity comprises receiving, at the server, a query identifying a plurality of attributes of an entity; wherein accessing, at the server, a set of candidate templates for answering the query based on the one or more attributes of the entity comprises accessing at the server, for each of the plurality of attributes of the entity, a set of candidate templates for answering the query based on the respective attribute of the entity; wherein obtaining, at the server, a set of information that answers the query comprises obtaining at the server, for each of the plurality of attributes of the entity, a set of information that answers a respective portion of the query; wherein selecting, at the server, the template from which to generate the phrase that comprises an answer to the query comprises selecting at the server, for each of the plurality of attributes of the entity, a template from the respective set of candidate templates; wherein generating, at the server, the phrase by adding the set of information to the one or more fields of the selected template, such that the phrase comprises an answer to the query comprises generating at the server, for each of the plurality of attributes of the entity, a phrase by adding the respective set of information to the one or more fields of the selected template; and wherein communicating, from the server, the phrase for output by a client device comprises communicating from the server, a sentence including the phrases to a client device, wherein the operations further comprise, obtaining, at the server, a sentence template based on a type of the entity, wherein the sentence template includes a plurality of fields for phrases; and adding the phrases to the fields of the sentence template to form the sentence.