Machine learning-driven system architecture automation
A system includes non-transitory computer-readable media storing instructions and an electronic processor configured to execute the instructions to receive a query from a user device, generate a query embedding based on the query, select artifact embeddings from a set of artifact embeddings based on a closeness between each artifact embedding and the query embedding, the query embedding and the set of artifact embeddings being in a same feature space, retrieve a knowledge graph from a data store, the knowledge graph including nodes representing artifacts corresponding to the selected artifact embeddings and edges representing semantic relationships between the artifacts, provide an input including a representation of the query, the selected artifact embeddings, and the knowledge graph to a generative model to generate an output, and transmit the output to the user device.
1 . A system, comprising:
non-transitory computer-readable media storing instructions; and
an electronic processor configured to execute the instructions to:
receive a query from a user device,
generate a query embedding based on the query,
select artifact embeddings from a set of artifact embeddings based on a closeness between each artifact embedding and the query embedding, the query embedding and the set of artifact embeddings being in a same feature space,
retrieve a knowledge graph from a data store, the knowledge graph including nodes representing artifacts corresponding to the selected artifact embeddings and edges representing semantic relationships between the artifacts,
provide an input including a representation of the query, the selected artifact embeddings, and the knowledge graph to a generative model to generate an output,
perform a postprocessing operation on the output by comparing the output with the selected artifact embeddings to determine whether the output aligns with the selected artifact embeddings, and
in response to determining that the output aligns with the selected artifact embeddings, transmit the output to the user device.
2 . The system of claim 1 , wherein the electronic processor is further configured to execute the instructions to:
select a subset of the set of artifact embeddings based a tag of each artifact embedding; and
select artifact embeddings from the subset of artifact embeddings based on a closeness between each artifact embedding in the subset of artifact embeddings and the query embedding.
3 . The system of claim 2 , wherein the electronic processor is further configured to execute the instructions to select the subset of the set of artifact embeddings based on a similarity between the tag of each artifact embedding and a semantic content of the query.
4 . The system of claim 1 , wherein the electronic processor is further configured to execute the instructions to:
segment each artifact in a set of artifacts into one or more chunks;
generate a chunk embedding based on each chunk; and
assign a tag to each chunk embedding.
5 . The system of claim 4 , wherein the electronic processor is further configured to execute the instructions to assign the tag to each chunk embedding based on a semantic content of the respective chunk.
6 . The system of claim 1 , wherein each artifact embedding in the set of artifact embeddings is generated based on an artifact related to a computer architecture.
7 . The system of claim 1 , wherein each artifact embedding in the set of artifact embeddings is generated based on an artifact defining at least a portion of a computer architecture.
8 . The system of claim 1 , wherein the output defines at least a portion of a computer architecture.
9 . The system of claim 1 , wherein the output includes an artifact defining at least a portion of a computer architecture.
10 . The system of claim 1 , wherein the output includes at least a portion of computer code.
11 . A method, comprising:
receiving, with a machine learning platform, a query from a user device;
generating, with the machine learning platform, a query embedding based on the query;
selecting, with the machine learning platform, artifact embeddings from a set of artifact embeddings based on a closeness between each artifact embedding and the query embedding, the query embedding and the set of artifact embeddings being in a same feature space;
retrieving, with the machine learning platform, a knowledge graph from a data store, the knowledge graph including nodes representing artifacts corresponding to the selected artifacts and edges representing semantic relationships between the artifacts;
providing, with the machine learning platform, an input including a representation of the query, the selected artifact embeddings, and the knowledge graph to a generative model to generate an output;
performing, with the machine learning platform, a postprocessing operation on the output by comparing the output with the selected artifact embeddings to determine whether the output aligns with the selected artifact embeddings;
transmitting, with the machine learning platform, the output to a user device.
12 . The method of claim 11 , further comprising:
selecting, with the machine learning platform, a subset of the artifact embeddings based on a tag of each artifact embedding; and
selecting, with the machine learning platform, artifact embeddings from the subset of artifact embeddings based on a closeness between each artifact embedding in the subset of artifact embeddings and the query embedding.
13 . The method of claim 12 , further comprising selecting, with the machine learning platform, the subset of the set of artifact embeddings based on a similarity between the tag of each artifact embedding and a semantic content of the query.
14 . The method of claim 11 , further comprising:
segmenting, with the machine learning platform, each artifact in a set of artifacts into one or more chunks;
generate, with the machine learning platform, a chunk embedding based on each chunk; and
assign, with the machine learning platform, a tag to each chunk embedding.
15 . The method of claim 14 , further comprising assigning, with the machine learning platform, the tag to each chunk embedding based on a semantic content of the respective chunk.
16 . The method of claim 11 , wherein each artifact embedding in the set of artifact embeddings is generated based on an artifact related to a computer architecture.
17 . The method of claim 11 , wherein each artifact embedding in the set of artifact embeddings is generated based on an artifact defining at least a portion of a computer architecture.
18 . The method of claim 11 , wherein the output defines at least a portion of a computer architecture.
19 . The method of claim 11 , wherein the output includes an artifact defining at least a portion of a computer architecture.
20 . The method of claim 11 , wherein the output includes at least a portion of computer code.
21 . A non-transitory computer-readable storage medium comprising instructions that, when executed by an electronic processor, cause the electronic processor to:
receive a query from a user device;
generate a query embedding based on the query;
select artifact embeddings from a set of artifact embeddings based on a closeness between each artifact embedding and the query embedding, the query embedding and the set of artifact embeddings being in a same feature space;
retrieve a knowledge graph from a data store, the knowledge graph including nodes representing artifacts corresponding to the selected artifact embeddings and edges representing semantic relationships between the artifacts;
provide an input including a representation of the query, the selected artifact embeddings, and the knowledge graph to a generative model to generate an output;
perform a postprocessing operation on the output by comparing the output with the selected artifact embeddings to determine whether the output aligns with the selected artifact embeddings; and
in response to determining that the output aligns with the selected artifact embeddings, transmit the output to the user device.
22 . The non-transitory computer-readable storage medium of claim 21 , wherein the output includes at least a portion of computer code.