Direct Answer Not Populating

Hi Team,

I’m trying to set up a directAnswer filter on the mainPhone field for the Professional entities in my Answers experience. For example, I’d love for a query like “Call Ernie Hill” to return a direct answer with Ernie’s phone number. The search term Ernie Hill resolves to a single entity in the Knowledge Graph so I thought this would be a good use case for a direct answer. I used the following code to set up the directAnswer feature:

"mainPhone": { "directAnswer": true }

I also set up one way synonyms in the backend, mapping the term “call” to “main phone” as I’ve seen in other configuration examples.

If you run the query “Call Ernie Hill,” no results are returned. Interestingly enough, even the query “Ernie Hill” does not return any results, despite the fact that there is a “textSearch” filter on the name field. However, if I search for “Ernie” the correct entity is returned, while a query for “Hill” does not return any results.

I’m not sure if the two issues outlined above are related, but I thought it was worth noting.

Any feedback here would be much appreciated!

Thank you,
Austin

Hi Austin,

It sounds like the query ‘Ernie Hill’ isn’t returning results - if that query doesn’t surface a result, ‘Call Ernie Hill’ will not surface a direct answer.

Our typical recommendation for searching names is to have nlpFilters on the first and last name, as well as text search on the full name.

I’d focus efforts on ensuring Ernie Hill surfaces for the queries you want, and then the direct answer will likely work!

Hey Amani,

That’s a great point! A word to the wise: if you’re using the built in location entity type for Professionals, I would recommend creating custom fields for First Name and Last Name. Then, once you make those fields searchable in the backend, search result quality should improve tremendously on Professional related searches.

As for the Direct Answer functionality, I’m unsure as to why a Direct Answer does not appear for a query like “Call my advisor Ernie Hill”. I thought this query would work for a Direct Answer as it resolves to a single entity in the Knowledge Graph. To test this, I tried adding a Direct Answer filter on the name field for Professional entities, but similarly did not get a Direct Answer. I’ve tried similar queries for other Professionals as well, but have had no luck. Does anyone have some insight as to why this may be happening?

Thank you!
Austin

Hi @afarooque / Amani,

I’m relatively new to the Yext platform and reading up on some posts here in the community.
In this here post from December '20 @Max_Davish states that using phrase match for first and last name fields is the way to go in this scenario (as opposed to nlpFilters). Has the way of thinking/best practice changed here (e.g. because phrase match had not been available back in August)? Just being curious.

Thanks
Stefan

Hey Stefan - that’s right, the phrase match algorithm didn’t exist in August '20 when this post was originally made. Since then we’ve updated our best practices around name searching, since phrase match is a little less rigid than NLP filters. You can read more about it here!

1 Like