IP Library Granted Patent US 12,614,033
Granted Patent B2
US 12,614,033 · App. 18/406,478 · Granted Apr 28, 2026

Device and computer-implemented method for operating a knowledge base comprising a language model

Inventors: Heike Adel-Vu (Renningen, DE); Jun Araki (San Jose, CA); Koustava Goswami (Galway, IE); Lukas Lange (Pforzheim, DE)
Assignee: ROBERT BOSCH GMBH
G06F40/284G06F16/319G06F40/40
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,614,033
App. No.
18/406,478
Granted
Apr 28, 2026
Kind
B2
Abstract

A device and computer implemented method for operating a knowledge base including a language model. The language model is pre-trained for a first domain and comprises a tokenizer and a transformer. The method includes providing an input sentence of a second domain, tokenizing the input sentence with the tokenizer into tokens, transforming the tokens with the transformer to a sentence embedding, providing a first set of embeddings that represent a prompt of the first domain, providing a second set of embeddings, wherein the second set of embeddings comprises the first set of embeddings and a set of embeddings that represent keywords of the second domain, determining a prompt depending on the first set of embeddings and the second set of embeddings, transforming at least one of the tokens and the prompt with the transformer to an output of the knowledge base.

Claims (68)

1 . A computer-implemented method for operating a knowledge base including a language model, wherein the language model is pre-trained for a first domain and includes a tokenizer and a transformer, the method comprising the following steps:

providing an input sentence of a second domain;

tokenizing the input sentence with the tokenizer into tokens;

determining, by the transformer, respective embeddings for the individual tokens of the input sentence;

transforming the tokens with the transformer to a sentence embedding representing the input sentence as a whole;

identifying the input sentence as belonging to the second domain;

selecting, based on the identification, a set of keywords of the second domain;

providing a first set of embeddings that includes:

a prompt embedding of the first domain; and

the respective embeddings of the individual tokens of the input sentence;

providing a second set of embeddings that includes:

the first set of embeddings; and

a set of embeddings that represent the selected keywords of the second domain;

determining, based on the sentence embedding, a respective weight for the first set of embeddings and a respective weight for the second set of embeddings;

blending the first set of embeddings and the second set of embeddings according to the respective weights to determine a blended prompt; and

transforming, with the transformer, at least one of the tokens and the blended prompt to an output of the knowledge base.

2 . The method according to claim 1 , wherein the knowledge base includes a classifier, wherein the method further comprise:

determining a classification of the output with the classifier, and:

determining a label for at least one of the tokens depending on the classification, or

determining an entry of the knowledge base that corresponds to at least one of the tokens depending on the classification for the at least one of the tokens, or

determining a relation of at least two of the tokens depending on the classification.

3 . The method according to claim 1 , wherein the blending includes determining a sum, the weighted first set of embeddings and the weighted second set of embeddings being terms of the sum.

4 . The method according to claim 1 , wherein the determining of the first weight includes weighting the sentence embedding with a first weighting factor.

5 . The method according to claim 4 , further comprising:

initializing the first set of embeddings, and/or the set of embeddings that represent the selected keywords, and/or the first weighting factor randomly from a uniform distribution;

providing training data for training the first set of embeddings, the set of embeddings that represent the selected keywords and/or the first weighting factor; and

training the first set of embeddings, and/or the set of embeddings that represent the selected keywords and/or the first weighting factor while keeping the language model static.

6 . The method according to claim 1 , wherein the providing the second set of embeddings includes determining an order of the first set of embeddings and the set of embeddings that represent the selected keywords.

7 . The method according to claim 6 , wherein the determining of the order includes: (i) arranging the first set of embeddings before the set of embeddings that represent the selected keywords, and/or arranging the first set of embeddings after the set of embeddings that represent the selected keywords.

8 . The method according to claim 6 , wherein: (i) the determining of the second set of embeddings includes determining a weighted sum of the first set of embeddings arranged before the set of embeddings that represent the selected keywords and the first set of embeddings arranged after the set of embeddings that represent the selected keywords, or (ii) the determining of the order includes determining an ordering weight depending on the sentence embedding, determining if the ordering weight meets a condition, and either arranging the first set of embeddings before the set of embeddings that represent the selected keywords when the ordering weight meets the condition, or arranging the first set of embeddings after the set of embeddings that represent the selected keywords otherwise.

9 . The method according to claim 8 , wherein the determining of the ordering weight includes weighting the sentence embedding with a weighting factor.

10 . The method according to claim 1 , wherein the providing of the second set of embeddings includes determining the set of embeddings that represent the selected keywords depending on their respective term frequency in a document of the second domain and/or their respective inverse term frequency in a set of documents of the second domain and/or their respective term frequency in a document of the first domain.

11 . A device for operating a knowledge base including a language model, wherein the language model is pre-trained for a first domain and includes a tokenizer and a transformer, the device comprising:

at least one processor; and

at least one non-transitory storage;

wherein the at least one processor is configured to process instructions that, when executed by the at least one processor, cause the at least one processor to perform the following steps:

providing an input sentence of a second domain;

tokenizing the input sentence with the tokenizer into tokens;

determining, by the transformer, respective embeddings for the individual tokens of the input sentence;

transforming the tokens with the transformer to a sentence embedding representing the input sentence as a whole;

identifying the input sentence as belonging to the second domain;

selecting, based on the identification, a set of keywords of the second domain;

providing a first set of embeddings that includes:

a prompt embedding of the first domain; and

the respective embeddings of the individual tokens of the input sentence;

providing a second set of embeddings that includes:

the first set of embeddings; and

a set of embeddings that represent the selected keywords of the second domain;

determining, based on the sentence embedding, a respective weight for the first set of embeddings and a respective weight for the second set of embeddings;

blending the first set of embeddings and the second set of embeddings according to the respective weights to determine a blended prompt; and

transforming, with the transformer, at least one of the tokens and the blended prompt to an output of the knowledge base;

wherein the at least one storage is configured to store the instructions and the knowledge base.

12 . A non-transitory computer-readable medium on which is stored a computer program for operating a knowledge base including a language model that is pre-trained for a first domain, the computer program including computer readable instructions that, when executed by a computer, cause the computer to perform the following steps:

providing an input sentence of a second domain;

tokenizing the input sentence with a tokenizer into tokens;

determining, by a transformer, respective embeddings for the individual tokens of the input sentence;

transforming the tokens with the transformer to a sentence embedding representing the input sentence as a whole;

identifying the input sentence as belonging to the second domain;

selecting, based on the identification, a set of keywords of the second domain;

providing a first set of embeddings that includes:

a prompt embedding of the first domain; and

the respective embeddings of the individual tokens of the input sentence;

providing a second set of embeddings that includes:

the first set of embeddings; and

a set of embeddings that represent the selected keywords of the second domain;

determining, based on the sentence embedding, a respective weight for the first set of embeddings and a respective weight for the second set of embeddings;

blending the first set of embeddings and the second set of embeddings according to the respective weights to determine a blended prompt; and

transforming, with the transformer, at least one of the tokens and the blended prompt to an output of the knowledge base.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 16, 2024
From: ADEL-VU, HEIKE; ARAKI, JUN; GOSWAMI, KOUSTAVA; LANGE, LUKAS
To: ROBERT BOSCH GMBH
Reel/Frame 066480/0661 →
Priority Claims (1)
DE 10 2023 200 347.3 · Jan 18, 2023 · national
Continuity (1)
Related Publication 20240242028A1 · Jul 18, 2024
References Cited (16)
US 11042700B1 · Walters · 2021 [cited by examiner]
US 20220222437A1 · Lauber · 2022 [cited by examiner]
US 20240054179A1 · Elyasi · 2024 [cited by examiner]
US 20240054552A1 · Fu · 2024 [cited by examiner]
US 20240111794A1 · Osuala · 2024 [cited by examiner]
US 20240242028A1 · Adel-Vu · 2024 [cited by examiner]
US 20250245445A1 · Hitesh · 2025 [cited by examiner]
US 20250252254A1 · Gao · 2025 [cited by examiner]
US 20250252554A1 · He · 2025 [cited by examiner]
Li, Xiang & Liang, Percy, Prefix-Tuning: Optimizing Continuous Prompts for Generation, Jan. 1, 2021 (Year: 2021). [cited by examiner]
Liu, Xiao et al., P-Tuning v2: Prompt Tuning Can Be Comparable to Fine-tuning Universally Across Scales and Tasks, Mar. 20, 2022 (Year: 2022). [cited by examiner]
Bishop, Christopher M.: “Pattern Recognition and Machine Learning,” (2006), Springer, Ch. 14. Combining Models, pp. 1-20. [cited by applicant]
Lester, et al.: “The Power of Scale for Parameter-Efficient Prompt Tuning,” arXiv:2104.08691, (2021), pp. 1-15. [cited by applicant]
Gao et al., “Making Pre-Trained Language Models Better Few-Shot Learners,” Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural L… [cited by applicant]
Liu et al., “P-Tuning: Prompt Tuning Can be Comparable to Fine-Tuning Across Scales and Tasks,” Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics, vol. 2, 2022, pp. 61-68. <https://… [cited by applicant]
Qin et al., “LFPT5: A Unified Framework for Lifelong Few-Shot Language Learning Based on Prompt Tuning of T5,” International Conference on Learning Representations (ICLR), 2022, pp. 1-15. [cited by applicant]