US 12,111,826 B1
Neural search for programming-related query answering
Suthee Chaidaroon, Sunnyvale, CA (US); Xiao Zhang, Redmond, WA (US); Shruti Subramaniyam, Seattle, WA (US); Sidharth Gulati, Mountain View, CA (US); Jeffrey Thomas Svajlenko, Redmond, WA (US); Iman Keivanloo, Sammamish, WA (US); Rick Nayar, Issaquah, WA (US); and Regina M Joy, Los Altos, CA (US)
Assigned to Amazon Technologies, Inc., Seattle, WA (US)
Filed by Amazon Technologies, Inc., Seattle, WA (US)
Filed on Mar. 31, 2023, as Appl. No. 18/194,543.
Int. Cl. G06F 17/30 (2006.01); G06F 16/242 (2019.01); G06F 16/2457 (2019.01)
CPC G06F 16/242 (2019.01) [G06F 16/24575 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A system comprising:
one or more computing devices configured to:
receive programming related training data comprising queries and answers;
implement an encoder that is initially pre-trained to perform initial embedding of the queries and the answers;
determine contrastive loss values for query-answer pairs, wherein a query of a given query-answer pair is encoded as a vector in Euclidean space and a corresponding answer of the given query-answer pair is encoded as another vector in the Euclidean space, and wherein a contrastive loss value for the given query-answer pair is determined based on comparing a similarity score determined between the encoded query vector and the corresponding encoded answer vector and another similarity score determined between the encoded query vector and an encoded unrelated answer vector;
train transformer layers for the encoder using the query-answer pairs and the determined contrastive loss values for the respective query-answer pairs such that encoded query vectors are located in the Euclidean space proximate to encoded answer vectors for the respective query-answer pairs, as compared to the encoded unrelated answer vectors; and
perform, using the encoder comprising the trained transformer layers, query answering for programming related queries.