Skip to content

Tips for Prompting with Knowledge Bases

In this article, you will find tips on how to formulate optimal prompts to work effectively with knowledge databases in Alan.

Context Framing

Provide a brief introduction or context that gives background information and sets up the request. The more specific the input, the better the results.

Positive Example:

  • "I work in IT support. A customer has forgotten their password. What do I need to do now?"
  • "I am an HR manager developing a new onboarding program. What internal best practices should be considered?"

Focus on Semantic Content

Phrase questions based on linguistic content rather than the structure of the document.

Positive Example:

  • "I am the process owner of process XY, what should I consider when handling a change request?"

Negative Example:

  • "What does the Change Management Handbook say on page 12?"

What Doesn’t Work Well

Ambiguity

Vague or ambiguous phrasing leads to unclear results.

Negative Example:

  • "Tell me something about IT." (too vague)

Limited Domain Expertise

RAG models may not have specific domain expertise or knowledge outside of the uploaded knowledge database.

Negative Example:

  • "Can you give me the detailed biography of my colleague Jens Müller, including his birthday and work history?" (not in the language model or the knowledge database)

Document Structure as a Basis

Avoid phrases like "in the third section," "on page 46," or "in line 5 of table XY." Instead, refer to the semantic content.

Referring to Entire Documents

Avoid requests like "Analyze the entire document" or "Give me a summary of the whole report," as the current generation of large language models cannot process large documents entirely. Instead, relevant excerpts are extracted from knowledge databases and provided to the language model. Therefore, focus on precise questions related to the information to be extracted.