Dify Workflow Basics interview questions

25 questions from the Dify Workflow Basics course, each with the correct answer and an explanation. Try to answer before you open the answer.

Getting to Know Dify

1. Which is part of Dify's feature set?

  1. A replacement for a SQL database
  2. Training foundation models from scratch
  3. Visual workflows, knowledge bases, model provider connections and an API for each app
  4. A mobile operating system
Show answer

Answer: Visual workflows, knowledge bases, model provider connections and an API for each app

Dify orchestrates models; it does not pretrain them.

Lesson: What Dify Is

2. Which app type suits "classify each incoming support ticket and return a category"?

  1. Workflow
  2. Chatflow with long memory
  3. Text-to-speech app
  4. No app is needed
Show answer

Answer: Workflow

One input, one structured output.

Lesson: App Types: Chatbot, Agent, Chatflow and Workflow

3. What is a main reason to self-host Dify?

  1. It removes the need for API keys
  2. It requires no maintenance
  3. It makes models free
  4. Keeping data and infrastructure under your own control
Show answer

Answer: Keeping data and infrastructure under your own control

Control comes with operational work.

Lesson: Setting Up: Cloud or Self-Hosted, and Model Providers

Workflow Building Blocks

4. Where are a workflow's input variables declared?

  1. In the end node
  2. In the start node
  3. In the model provider settings
  4. In the browser console
Show answer

Answer: In the start node

The start node defines what a run receives.

Lesson: Start Node and Variables

5. What happens if a prompt references a variable that has no value?

  1. The model always refuses
  2. It can render as empty text, quietly changing the prompt
  3. The variable is invented automatically
  4. Dify trains a new model
Show answer

Answer: It can render as empty text, quietly changing the prompt

Verify rendered prompts.

Lesson: LLM Nodes and Prompt Templates

6. Why keep the same output names on every branch?

  1. It reduces token usage to zero
  2. It speeds up the model
  3. Dify forbids different names
  4. So callers can rely on a consistent response shape
Show answer

Answer: So callers can rely on a consistent response shape

Predictable outputs simplify integration.

Lesson: End Node and Outputs

Knowledge Bases and Retrieval

7. What does chunk overlap help with?

  1. Reducing the chance that a fact is split across two chunks
  2. Making the index smaller
  3. Removing the need for embeddings
  4. Speeding up the LLM
Show answer

Answer: Reducing the chance that a fact is split across two chunks

Overlap keeps boundary context.

Lesson: Creating a Knowledge Base and Chunking

8. Why can keyword search return the wrong chunk for "how many days for a refund"?

  1. Refund chunks cannot be indexed
  2. Keyword search always returns nothing
  3. It matches shared words like "days" without understanding meaning
  4. Top K must be zero
Show answer

Answer: It matches shared words like "days" without understanding meaning

Hybrid search and reranking help.

Lesson: Retrieval Settings: Search Mode, Top K and Threshold

9. What should a grounded RAG app do when the context lacks the answer?

  1. Return the whole knowledge base
  2. Invent a plausible answer
  3. Say it could not find the answer
  4. Crash
Show answer

Answer: Say it could not find the answer

Honest refusals build trust.

Lesson: Grounded Answers From Retrieved Context

Routing, Classification and Iteration

10. Why order if/else conditions from specific to general?

  1. The first matching branch wins, so general conditions would catch specific cases
  2. Dify sorts them alphabetically anyway
  3. Order never matters
  4. Only one condition is allowed
Show answer

Answer: The first matching branch wins, so general conditions would catch specific cases

Specific rules first.

Lesson: If/Else Branches

11. How should you check a question classifier node?

  1. Check only one example
  2. Trust it without testing
  3. Count the number of classes
  4. Measure routing accuracy on labelled real messages
Show answer

Answer: Measure routing accuracy on labelled real messages

Routing errors cascade downstream.

Lesson: Question Classifier Node

12. What does an iteration node output?

  1. A single random item
  2. An array with one result per input item
  3. Nothing
  4. Only the first item's result
Show answer

Answer: An array with one result per input item

Map over items, then collect.

Lesson: Iteration Over Lists

13. What problem does the variable aggregator solve?

  1. It trains the classifier
  2. It lets downstream nodes use one variable regardless of which branch ran
  3. It deletes branches
  4. It uploads documents
Show answer

Answer: It lets downstream nodes use one variable regardless of which branch ran

Merge results from alternative paths.

Lesson: Variable Aggregator and Merging Branches

Code, Extraction and External Calls

14. What does a Dify code node's main function return?

  1. Nothing; it only prints
  2. A web page
  3. A trained model
  4. A dictionary whose keys become output variables
Show answer

Answer: A dictionary whose keys become output variables

Returned keys feed downstream nodes.

Lesson: Code Nodes

15. Why validate parameter extractor output?

  1. The model can omit fields or return wrong types
  2. Extraction is always perfect
  3. Validation trains the model
  4. It reduces the number of nodes
Show answer

Answer: The model can omit fields or return wrong types

Trust, but check.

Lesson: Parameter Extraction

16. Where should API credentials for an HTTP node live?

  1. In the end node output
  2. Inside the system prompt
  3. In secure environment or secret settings, not in prompts
  4. In the user's message
Show answer

Answer: In secure environment or secret settings, not in prompts

Keep secrets out of model-visible text.

Lesson: HTTP Requests, Tools and Plugins

Chatflows, Memory and Agents

17. What do conversation variables provide in a chatflow?

  1. Document chunking
  2. Faster models
  3. State that persists across turns
  4. API keys
Show answer

Answer: State that persists across turns

Remember important facts explicitly.

Lesson: Chatflows Versus Workflows

18. What is a cost of a very large memory window?

  1. More tokens per call and more chance of distraction by stale details
  2. The model forgets everything
  3. It disables retrieval
  4. It removes the end node
Show answer

Answer: More tokens per call and more chance of distraction by stale details

More context is not always better.

Lesson: Memory and Context Length

19. When is a fixed workflow better than an agent?

  1. Never
  2. When the task is completely open-ended
  3. When you want less predictability
  4. When the steps are known and always the same
Show answer

Answer: When the steps are known and always the same

Predictability is valuable.

Lesson: Agent Nodes and Tool Use

Publishing and Calling Apps

20. Where should the Dify app API key be used?

  1. In a public JavaScript bundle
  2. In your backend server, never in browser code
  3. In the prompt text
  4. In the end node output
Show answer

Answer: In your backend server, never in browser code

Keys in browsers can be stolen.

Lesson: Calling a Workflow Through the API

21. When is a streamed answer complete?

  1. After the first text chunk
  2. When the workflow-finished event arrives
  3. Immediately after the request is sent
  4. When the browser tab closes
Show answer

Answer: When the workflow-finished event arrives

Wait for the completion event.

Lesson: Streaming Responses

22. What is the DSL export useful for?

  1. Replacing the knowledge base
  2. Training models
  3. Storing user passwords
  4. Backups, moving apps between environments and reviewing changes
Show answer

Answer: Backups, moving apps between environments and reviewing changes

Treat app definitions like code.

Lesson: Publishing, Web Apps and Versions

Debugging, Cost and Production Readiness

23. An answer is wrong; what should you check early?

  1. Whether routing and retrieval behaved as expected
  2. Only the font of the web app
  3. The number of API keys
  4. Nothing; republish
Show answer

Answer: Whether routing and retrieval behaved as expected

Most failures start upstream of the LLM.

Lesson: Logs, Tracing and Debugging

24. Which change usually saves the most in the example?

  1. Renaming variables
  2. Removing the free retrieval node
  3. Reducing the large answer model's input tokens
  4. Changing the app icon
Show answer

Answer: Reducing the large answer model's input tokens

Target the dominant cost.

Lesson: Cost per Run

25. Which item belongs on a Dify launch checklist?

  1. Arithmetic done by the LLM
  2. API key embedded in the web page
  3. Routing accuracy measured on labelled messages
  4. No test inputs
Show answer

Answer: Routing accuracy measured on labelled messages

Measure, secure, version.

Lesson: A Production Readiness Checklist

← Back to the course