US 12,242,817 B1
Artificial intelligence models in an automated chat assistant determining workplace accommodations
Matthew Thomas, Fredericksburg, VA (US)
Assigned to LIGILO INC., Richmond, VA (US)
Filed by Ligilo Inc., Richmond, VA (US)
Filed on Nov. 20, 2023, as Appl. No. 18/514,224.
Int. Cl. G06F 40/30 (2020.01); G06F 3/08 (2006.01); G06F 16/24 (2019.01); G06F 40/284 (2020.01); G06F 40/40 (2020.01); G06Q 10/1057 (2023.01)
CPC G06F 40/40 (2020.01) [G06F 40/284 (2020.01); G06Q 10/1057 (2013.01)] 12 Claims
OG exemplary drawing
 
1. A computer-implemented method comprising:
determining, using a second LLM, whether or not a query is related to accommodations, wherein the second LLM is fine-tuned to predict a respective new token representing a respective binary classification output in response to a respective query, wherein the second LLM is pre-trained using training input comprising (i) a first instructional prompt to the second LLM to classify a question with a completion of one of True or False for whether or not the question is related to accommodations, and (ii) training records each comprising (a) a first respective training question and (b) a first respective training completion comprising one of True or False as a predicted next token based on the first respective training question; and
when the query is related to accommodations:
determining one or more accommodations responsive to the query using a third LLM; and
formulating a response to the query using a fourth LLM based on the one or more accommodations; and
when the query is not related to accommodations:
generating a declining response using a text-generation LLM using a second instructional prompt comprising a text representation of a conversation history stored in a cache memory, wherein the conversation history comprises the query,
wherein:
the third LLM is an embeddings LLM configured to determine a similarity between the query and accommodation descriptions;
determining the one or more accommodations responsive to the query using the third LLM further comprises:
generating a query embedding vector for the query using the embeddings LLM;
performing a vector search comprising searching a vector database for one or more top matches of embeddings of the accommodation descriptions with respect to the query embedding vector, comprising calculating, using a cosine similarity measure for determining a vector distance, a respective vector distance metric between each of the embeddings of the accommodation descriptions and the query embedding vector, wherein the vector database comprises the embeddings of the accommodation descriptions that are predetermined and stored before receiving the query, and wherein the one or more top matches are selected based on the respective vector distance metric for the one or more top matches being below a predetermined threshold; and
determining the one or more accommodations based on the one or more top matches; and
the fourth LLM is pre-trained using a third instructional prompt comprising instructions for how to address a medical diagnosis raised in a question, instructions for asking about how a disability affects work, and definitions of keywords, and one or more training records each comprising: a second respective training question and a second respective training completion comprising a respective informational answer responsive to the second respective training question based on the third instructional prompt.