Beyond ABAPdesigned by@Tejoram97
Beyond ABAP / SAP Business AI / Interview Questions

Interview Questions

SAP Business AI · SAP BTP ·

Open the interactive lesson →

All SAP Business AI – Joule & Joule Studio interview questions in one place, grouped by page. Read the page when an answer needs more depth.

How to practise: cover the answer, say yours out loud in 30–60 seconds, then compare.

01 · SAP Business AI – Overview, Architecture & Strategy

Q1. What is SAP Business AI?

SAP's umbrella for all its AI: embedded AI features in the applications, Joule with its assistants and agents as the conversational and agentic layer, and the AI Foundation on SAP BTP (SAP AI Core, generative AI hub, Joule Studio) for building your own.

Q2. What do "relevant, reliable, responsible" mean in SAP's AI strategy?

Relevant – built into the business processes; reliable – grounded in business data and process context; responsible – ethics, security and privacy, with the user's authorizations and human approval.

Q3. Describe the SAP Business AI landscape from the user down to the LLM.

Applications with embedded AI → Joule (copilot, assistants, agents) → SAP Business AI Platform: AI Foundation (AI Core with generative AI hub, Joule Studio, AI Agent Hub) plus business context (Business Data Cloud, Knowledge Graph, document grounding) → foundation models from several providers through the generative AI hub.

Q4. What is the SAP Business AI Platform?

Announced at Sapphire in May 2026: the unification of SAP BTP, SAP Business Data Cloud and SAP Business AI into one governed environment to build, contextualise and govern AI. The existing services remain the building blocks.

Q5. Why does SAP invest in Business Data Cloud and the Knowledge Graph for AI?

LLMs are only as good as the context they get. Data products give harmonised business data across applications; the Knowledge Graph describes entities, processes and relationships so agents find and join the right data – fewer hallucinations, more correct actions.

Q6. How are SAP's AI features licensed?

Base AI (including Joule Base: navigational, informational, transactional, simple analytical) is included in cloud subscriptions. Premium AI – advanced features and agent actions – consumes AI units from a shared annual pool. The generative AI hub for own apps is billed by consumption on BTP.

Q7. Does SAP use customer data to train the LLMs?

SAP does not pass customer data to third-party foundation model providers for training; the provider processes requests without keeping the data. SAP may improve its own features with data only where the contract allows, with transparency and opt-out in SAP for Me.

Q8. Embedded AI vs a Joule agent – give an example of each.

Embedded: S/4HANA Cloud creates a sales order from a customer's PDF inside the app. Agent: the Dispute Resolution Agent analyses a disputed invoice across billing, delivery and credit data, proposes a resolution and asks the accountant to approve.

Q9. Can an S/4HANA on-premise or ECC customer use Joule?

Only selected AI scenarios, and since Sapphire 2026 only for customers that commit to moving the majority of their landscape to SAP Cloud ERP. Full Joule is a cloud capability: Public Edition first, Private Edition via BTP and Cloud Connector.

Q10. What is SAP AI Agent Hub?

A vendor-agnostic command centre to discover, inventory and govern SAP and non-SAP AI agents and MCP servers, integrated with SAP LeanIX and SAP Signavio; generally available since Sapphire 2026.

Q11. Which LLMs power SAP Business AI?

Several providers through the generative AI hub – e.g. OpenAI, Anthropic (Claude, named at Sapphire 2026 among the models for Joule agents), Google, plus sovereign options like Mistral AI and Cohere and SAP's own models such as SAP-ABAP-1. The model is chosen centrally, not in application code.

Q12. As an ABAP developer, how do you prepare a system for SAP Business AI?

Keep the core clean: expose logic through released APIs, RAP business objects and released CDS views, model custom Fiori apps with proper intents, build OData services that skills can call, and use the ABAP AI SDK and Joule for developers where AI belongs in custom code.

02 · Joule – SAP's AI Copilot & Agents

Q1. What are Joule's capability types?

Navigational (find and open the right app), transactional (create, read, update data in the chat), informational (answers from SAP Help and grounded customer documents) and analytical (explore data conversationally). Agents add multi-step goal-driven work on top.

Q2. Skill vs Joule Agent vs Joule Assistant?

A skill is one defined task with fixed steps. An agent has a goal, instructions and tools and lets the LLM plan the steps. An assistant is role-based and orchestrates a team of agents for one business role.

Q3. What does SAP mean by collaborative multi-agent AI?

Specialised agents that work together and with people across functions, coordinated by Joule – e.g. a case classification agent passes a billing dispute to the cash collection agent, which resolves it and asks for approval.

Q4. Which components do you need to set up Joule?

An enterprise BTP global account with Joule and SAP Build Work Zone entitlements in one subaccount, SAP Cloud Identity Services (IAS with OpenID Connect trust, IPS), the booster "Setting up Joule" that creates the Joule formation with the registered systems, destinations, and the product-specific configuration.

Q5. Why is SAP Build Work Zone required?

Its navigation service resolves intent-based navigation targets so Joule can open the right app with the user's roles; Work Zone sites are also a Joule channel. One Joule instance connects to one Work Zone edition.

Q6. What happens if two products use different IAS tenants?

They get separate Joule instances – no unified Joule across them. Rule: one IAS tenant per landscape tier with a consistent global user ID.

Q7. How does Joule respect authorizations?

It acts as the logged-in user: navigation only to apps in the user's Fiori role, reads and changes with the user's back-end authorizations, confirmation before saving, approval for critical agent steps.

Q8. How do you connect Joule to S/4HANA Cloud Private Edition?

Through SAP BTP: Joule and Work Zone subscriptions, IAS, Cloud Connector for connectivity, destinations and the features and Fiori content described in SAP Note 3523238. It is for RISE customers and needs more customer-managed configuration than Public Edition.

Q9. What is document grounding?

Managed RAG for Joule: administrator-connected repositories such as SharePoint or Work Zone advanced edition are indexed; Joule retrieves matching passages and answers with sources. Quality depends on curated, current documents.

Q10. Is Joule free?

Joule Base (navigational, informational, transactional, simple analytical) is included in SAP cloud subscriptions. Premium features and agent actions consume AI units.

Q11. How do Joule agents work with non-SAP agents?

Through open protocols – A2A between agents and MCP to tools. Joule supports bidirectional agent interoperability (e.g. with Google Cloud and Microsoft frameworks); third-party agents call Joule Agents through a governed agent gateway, and SAP AI Agent Hub governs all of them.

Q12. As an ABAP developer, what do you do in a Joule project?

Make custom apps reachable (semantic objects, target mappings, catalogs), expose logic through released OData / RAP APIs with correct authorization checks, analyse Gateway errors when skills fail, and build custom skills or agents in Joule Studio where SAP content has gaps.

03 · Joule Studio – Building Custom Skills & Agents

Q1. What is Joule Studio?

SAP's environment for extending Joule with custom skills and agents. The classic edition is part of SAP Build (skill builder, agent builder); the new Joule Studio, announced at Sapphire 2026, is the build layer of the SAP Business AI Platform with low-code and pro-code options and an SAP-managed runtime.

Q2. Joule skill or Joule agent – how do you decide?

If the flow can be drawn and must always behave the same, build a skill (deterministic, cheaper, testable). If the task needs planning, judgement or combining data and documents, build an agent that uses skills as tools.

Q3. What are the building blocks of a skill?

Trigger with skill inputs and outputs, Action activities (API calls from published action projects via destination variables), Check Condition branches, formulas, Send Message steps, and End with the output mapping – or Joule generates the response.

Q4. What do you configure in a Joule agent?

Name and description (routing), expertise, instructions, additional context, model settings (provider, base and advanced model, backup provider) and tools: Joule skills, other Joule agents, documents for grounding and the Calculator; human in the loop for critical steps.

Q5. How does a skill call S/4HANA on-premise?

Through an action project for the released OData API, a destination variable in the skill bound to a BTP destination at deploy time, and the Cloud Connector into the network – ideally with principal propagation so the user's S/4HANA authorizations apply.

Q6. Why is the description of a skill so important?

Joule uses it to decide which skill or agent handles a request. Vague or overlapping descriptions lead to the wrong skill being called.

Q7. What are the prerequisites for Joule Studio classic?

Joule in the landscape, SAP Build Process Automation (build-default plan) in the SAP Build tenant, IAS, the formation that provisions Joule Studio, destinations (plus Cloud Connector for on-premise) and released APIs; SAP AI Core and an object store for document grounding.

Q8. How do skills move from development to production?

Test in the private environment, release a project version, deploy it to a shared environment and bind the destination variables to that landscape's destinations; projects can be exported and imported as MTA archives between tenants.

Q9. How do you make an agent safe?

Back-end authorizations via principal propagation, confirmation and human approval before write actions, instructions that forbid invented values, grounding, small tool outputs, evaluation scenarios after every change, and the generative AI hub's masking and filters.

Q10. What is document grounding in Joule Studio?

RAG through SAP AI Core: documents in an object store are indexed once (Control Tower › Document Grounding) and added to an agent as a Documents tool, so answers come from company documents.

Q11. What does the new Joule Studio add?

Intent-based development, a pro-code path (jl CLI, coding agents, LangChain and other frameworks), agent extensions for SAP agents, MCP servers generated from APIs, n8n workflows and an SAP-managed runtime whose agents register with Joule and are managed in SAP AI Agent Hub.

Q12. Where does an ABAP developer fit into Joule Studio projects?

By providing the back end: clean, narrow, released APIs – RAP OData V4 services on released CDS views – with proper authorizations, plus the business logic that must stay deterministic in S/4HANA.

04 · Joule for Developers, ABAP AI & AI Foundation

Q1. Joule for developers vs ABAP AI SDK – what is the difference?

Joule for developers helps the developer write code in ADT or BAS (design time). The ABAP AI SDK lets an application call an LLM at run time through ISLM and the generative AI hub.

Q2. Which Joule capabilities do you use in ADT?

Joule chat, predictive code completion, explain, ABAP Unit and CDS test generation, OData UI service generation, RAP business logic prediction, consumption code for OData services and help with custom code migration findings – always reviewed and checked with ATC.

Q3. Where are the ABAP AI capabilities available?

SAP Business AI Platform, ABAP environment, S/4HANA Cloud Public Edition and Private Edition (SAP is extending it to all releases from 2021), in ADT for Eclipse and ADT for VS Code; licensed in AI units.

Q4. How do you call an LLM inside a RAP action?

In the action handler: read the texts with READ ENTITIES IN LOCAL MODE, call the ABAP AI SDK completion API with an ISLM scenario, write the result back with MODIFY ENTITIES, report errors in failed / reported and return the updated instances; the user reviews before saving.

Q5. Why should an LLM call not happen in the save sequence?

The save sequence must be fast and must not fail on external calls; an LLM call takes seconds and can fail. Call it in the interaction phase or in background processing and save only the reviewed result.

Q6. What is ISLM and what are embedded and side-by-side scenarios?

The S/4HANA framework that manages AI use cases as transportable intelligent scenarios. Embedded scenarios train and run in HANA (PAL / APL); side-by-side scenarios use SAP AI Core, including generative AI.

Q7. What are the steps to make an intelligent scenario usable?

Create and publish it in Intelligent Scenarios (with model and templates), train / synchronise, deploy and activate it in Intelligent Scenario Management, then call it from ABAP by its name.

Q8. Completion API or orchestration API?

The orchestration API when you need data masking, content filters, translation or grounding – defined in the scenario's execution flow template. The completion API for a simple, direct prompt.

Q9. How do CAP apps use generative AI?

With the SAP Cloud SDK for AI (JavaScript, Java, Python): an orchestration client that finds the bound SAP AI Core instance and calls the orchestration service; the CAP LLM plugin is the older, narrower option.

Q10. What is the ADT MCP server?

An MCP server in ADT that lets MCP-capable AI coding agents work with the ABAP system through the development tools – generally available for Eclipse and VS Code in 2026 and the base of SAP's custom code migration agents.

Q11. How does AI fit clean core?

Agents and AI features are API consumers: they use released APIs and RAP services, AI logic runs in ABAP Cloud with the released ABAP AI SDK, and SAP agents are extended, not copied. A clean extension is automatically AI-ready.

Q12. What risks do you manage when an app uses an LLM?

Hallucinations (grounding, validation), personal data (masking), prompt injection (filters, no blind actions), cost and latency (narrow prompts, background processing), and accountability (human review, logging).

05 · Joule Studio Developer Certification (C_JSD) – Scope, Hands-On & Exam Prep

Q1. What does the Joule Studio Developer certification validate, and how is it assessed?

The ability to build custom agents and extend LoB agents with Joule Studio. It is a 2-hour scenario-based assessment with a 60% cut score: you build agents in a practice system, then present them to an AI avatar and answer questions (or record an English video reviewed by people).

Q2. Explain the phases of intent-based development in Joule Studio.

Intent (intent document, fit-gap, Intent fit), Requirements (PRD), Specification (technical spec with tasks), Solution (generated code, tools, data), Testing (unit tests and AI evaluations) and Deployment to the SAP-managed runtime.

Q3. What is the difference between Quick Create and Guided?

Quick Create skips the clarifying questions and runs all phases automatically. Guided asks questions and waits for your confirmation after each phase, so you control and can explain the result.

Q4. What does an agent consist of?

Instructions, tools – SAP APIs, MCP servers, workflows – and optional human-in-the-loop steps, plus the business context used to design it and the generated tests.

Q5. What is an agent extension and what can it change?

An addition to an SAP-delivered agent that leaves its implementation unchanged. Depending on the agent (Agent Catalog), it adds instructions, MCP servers and pre- or post-execution hooks such as an n8n workflow.

Q6. How is an extension deployed?

In the Manage area: open the extension's overview, select Deploy, check the status and validate; Manage also handles versions and monitoring.

Q7. What role do SAP Knowledge Graph and SAP Domain Models play?

They provide business context: the Knowledge Graph supports API discovery, fit-gap analysis and mapping to SAP's Reference Business Architecture; domain models add SAP-specific knowledge so the generated solution fits SAP processes and data.

Q8. How do you test an agent in Joule Studio?

Automated tests and evaluations run after the build (Testing tab: passed, failed, coverage, score). Then you chat with the agent in the Try tab and follow each request in the Traces, including edge cases.

Q9. How do you keep an agent safe?

Authorizations enforced by the back-end APIs, human approval for write actions, instructions against invented values, minimal data, the sandboxed SAP-managed runtime, an owner and monitoring in SAP AI Agent Hub.

Q10. Where does n8n fit?

n8n workflows orchestrate steps visually inside Joule Studio – for example a SAP Task Center node for approvals or an SAP Agent node that calls another solution's agent – and serve as hooks in agent extensions.

Q11. What happens after you deploy a custom agent?

It runs on the SAP-managed Joule Studio runtime and registers with Joule; end users work with it through Joule Work and SAP AI Agent Hub manages and governs it. The Deployment tab shows its status; Manage › Try reaches it.

Q12. Low-code or pro-code – when would you use which?

Low-code in the browser for most agents and for the exam. Pro-code with the jl CLI, a coding agent via MCP and frameworks like LangChain when the team needs Git-based engineering, custom logic or its own toolchain – the same IBD phases apply.

06 · SAP AI Core & AI Launchpad – Hands-On

Q1. Which SAP AI Core plan do you need for the generative AI hub?

The extended plan. standard is for own models without generative AI; you can upgrade standard → extended but not downgrade. AI Launchpad has a single standard plan.

Q2. What is in an AI Core service key and how do you get a token?

clientid, clientsecret, the XSUAA url and serviceurls.AI_API_URL (or certificate fields for X.509). POST grant_type=client_credentials to url/oauth/token and send the token as Bearer header.

Q3. What is a resource group and why use several?

An isolation unit inside one tenant; configurations, deployments, executions and artifacts belong to one group, named in the AI-Resource-Group header. Separate teams, stages or customers, and give heavy workloads their own rate limit.

Q4. Explain scenario, executable, configuration, deployment and execution.

Scenario = use case; executable = workflow (training) or serving (inference) template; configuration = executable + parameters + artifacts; deployment = a running serving executable with a URL; execution = one run of a workflow.

Q5. How do you deploy an LLM in SAP AI Core?

Create a configuration in scenario foundation-models with the provider executable (e.g. azure-openai) and parameter bindings modelName / modelVersion, create a deployment from it, wait for RUNNING and use the deploymentUrl – in Launchpad, with the AI API or the SDK.

Q6. Do you need a deployment per model when you use orchestration?

No. Orchestration has its own deployment (pre-created in default) and reaches all models of the generative AI hub by name. Per-model deployments are only needed for direct calls.

Q7. Which executables exist in the foundation-models scenario?

azure-openai, aws-bedrock, gcp-vertexai, aicore-mistralai, aicore-sap (sap-abap-1, SAP-RPT-1; earlier lists: aicore-opensource, aicore-ibm), and newer ones such as aicore-nvidia, aicore-cohere and perplexity-ai; orchestration uses scenario and executable orchestration. Model names and versions: SAP Note 3437766 or /v2/lm/scenarios/foundation-models/models.

Q8. Which headers does an inference call need?

Authorization: Bearer <token> and AI-Resource-Group: <group of the deployment>, plus Content-Type: application/json; Azure OpenAI paths also need the api-version query parameter.

Q9. How do you keep AI Core credentials out of the code?

Environment variables or the SDK config file locally, service binding (VCAP_SERVICES) on Cloud Foundry or Kyma, or a BTP destination; never in Git, prompts or logs, and rotate the key.

Q10. The Generative AI Hub menu is missing in AI Launchpad – what do you check?

The AI Core plan (extended?), that a connection and resource group are selected in Workspaces, and the user's role collections – a generative AI role is needed and _without_genai collections hide it.

Q11. How is generative AI usage billed?

Tokens per model are converted to GenAI tokens and billed as BTP capacity units; orchestration modules (grounding, filtering, masking) and inference observability have their own metrics. AI units are for Premium AI in SAP applications, not for your own AI Core usage.

Q12. You get HTTP 429 from the generative AI hub – what does it mean and what do you do?

The per-model requests-per-minute limit (tenant or resource group) is exceeded or the provider is saturated. Retry with exponential backoff and jitter honouring Retry-After, spread load, cache, add a fallback model, isolate workloads in resource groups and request a quota increase.

Q13. modelVersion latest or a fixed version?

latest upgrades automatically but can change behaviour; a fixed version is predictable but stops working on its retirement date. In production pin it, evaluate the successor and PATCH the deployment.

Q14. What do Model Library, Prompt Editor and Evaluations give a developer?

Model Library: catalog, benchmark leaderboard, cost and deprecation per model. Prompt Editor: design and test prompts with variables, tools and JSON response formats, save them as versioned templates. Evaluations: compare prompt / model combinations on your own data with metrics.

07 · Generative AI Hub SDK & Orchestration in Python

Q1. Which Python package do you install for the generative AI hub today?

sap-ai-sdk-gen (SAP Cloud SDK for AI, generative part; import gen_ai_hub). generative-ai-hub-sdk is the deprecated old name – same import path. sap-ai-sdk-core is for AI Core administration.

Q2. How does the SDK find your credentials?

First AICORE_* environment variables, then ~/.aicore/config.json (or AICORE_HOME, AICORE_PROFILE, AICORE_CONFIG), then VCAP_SERVICES of a bound instance on Cloud Foundry or Kyma.

Q3. Native proxy client, LangChain client or orchestration – when which?

Native clients when you need provider-specific features; LangChain clients inside chains and agents; orchestration when you want one model-agnostic endpoint with masking, filtering, grounding and translation – the default for business apps.

Q4. Why do direct model calls need a deployment per model but orchestration does not?

Direct calls go to the model's own deployment URL in scenario foundation-models. Orchestration is one deployment that routes to any hub model named in the request.

Q5. Name the orchestration modules and which are mandatory.

Templating with the model configuration is mandatory; grounding, content filtering (input / output), data masking and translation (input / output) are optional.

Q6. How do you write a placeholder in an orchestration template?

{{?name}}; values come from placeholder_values at run time, defaults from the template's defaults, and the grounding module can fill one placeholder with retrieved context.

Q7. Which content filters are available?

Azure Content Safety (hate, sexual, violence, self-harm with thresholds, plus prompt shield on input and protected-material detection on output), Llama Guard 3 8B with categories such as privacy, hate or specialized advice, and IBM Granite Guardian (e.g. jailbreak, social bias) – configured separately for input and output.

Q8. Anonymization or pseudonymization – what is the difference?

Both are done by SAP Data Privacy Integration before the LLM call. Anonymization replaces entities irreversibly; pseudonymization uses reversible placeholders that are put back into the answer.

Q9. What is the prompt registry and how do you use it from code?

A versioned store for prompt templates and orchestration configs in AI Core. Create templates with PromptTemplateClient or declaratively from Git, and reference them in orchestration with a TemplateRef by ID or scenario / name / version.

Q10. How do you build a LangChain agent on SAP-hosted models?

Create the model with init_llm from gen_ai_hub.proxy.langchain, define tools with @tool, and pass both to create_agent; the SDK handles authentication and deployment lookup.

Q11. How do you trace SAP-hosted model calls with LangSmith?

Set LANGSMITH_TRACING=true, LANGSMITH_API_KEY and LANGSMITH_PROJECT (plus LANGSMITH_ENDPOINT for EU). Because the proxy models are LangChain models, all steps are traced – mind that prompts leave BTP.

Q12. How do you handle HTTP 429 in Python?

Use the SDK's retry (run_with_retries, model-level max_retries), exponential backoff with jitter honouring Retry-After, fallback models in the orchestration config, separate resource groups for heavy workloads and a quota increase request.

Q13. A content filter blocks a request – what happens and what should the app do?

The orchestration call raises an OrchestrationError with code, location and message instead of returning an answer. The app shows a neutral message, logs the request ID and does not retry.

Q14. How do you keep LLM cost under control in a Python app?

Log token usage per call, choose the smallest model that passes evaluation, short prompts and limited output tokens, cache, enable only the needed orchestration modules, and watch capacity unit consumption in BTP.

08 · RAG & Knowledge Graphs on SAP HANA Cloud

Q1. Explain the RAG flow and where SAP services fit.

Indexing: ingest, chunk, embed (generative AI hub model or VECTOR_EMBEDDING), store in a HANA Cloud REAL_VECTOR table with metadata. Query: embed the question, retrieve top-k with COSINE_SIMILARITY plus SQL filters, build a prompt with numbered sources, generate through the generative AI hub (ideally orchestration for masking and filters).

Q2. Why store vectors in HANA Cloud instead of a separate vector database?

Vectors sit next to the business data, so one SQL statement can join authorization and master data and rank by similarity; no extra system to secure, sync and operate; HANA also offers in-database embeddings, reranking and a knowledge graph engine.

Q3. COSINE_SIMILARITY vs L2DISTANCE?

Cosine measures the angle (-1 to 1, higher is more similar, order descending); L2 is the Euclidean distance (0 or more, smaller is closer, order ascending). For normalised embeddings both give the same ranking; the HNSW index must use the same function as the query.

Q4. What does VECTOR_EMBEDDING do and what do you need for it?

It creates embeddings inside HANA Cloud with an SAP model such as SAP_GXY.20250407 (older ID: SAP_NEB.20240715) – 'DOCUMENT' for stored text, 'QUERY' for questions. It needs the NLP feature enabled on the instance; a variant can call an SAP AI Core model through a remote source.

Q5. What is an HNSW index and when do you create one?

An approximate nearest-neighbour graph index (CREATE HNSW VECTOR INDEX … SIMILARITY FUNCTION …) that speeds up top-k queries at the cost of memory and a little recall. Create it when exact scans become too slow; tune M, efConstruction, efSearch.

Q6. How do you make sure RAG respects authorizations?

Filter in retrieval, before anything reaches the prompt: metadata columns such as plant or confidentiality, joined with the user's assignments taken from the JWT. Never rely on the LLM to hide content it has already seen.

Q7. Which chunking strategy would you choose for SAP maintenance manuals?

Structure-aware chunks along headings with the title and section path in each chunk, about 1000 characters with overlap, metadata for equipment, plant, language and page – then measure recall on a test set and adjust.

Q8. How do you build the LangChain vector store on HANA?

langchain-hana: HanaDB(connection=hdbcli_connection, embedding=init_embedding_model(...), table_name=...), add_documents, similarity_search_with_score(question, k, filter=...), as_retriever; HanaInternalEmbeddings for in-database embeddings and create_hnsw_index for the index.

Q9. Document grounding service or your own HANA RAG?

Managed document grounding for documents in SharePoint, S3 or SFTP with little effort, in the same orchestration call as masking and filters. Own HANA RAG when retrieval must use business data, custom chunking, strict authorization joins or a knowledge graph.

Q10. What is an RDF triple and how do you query the HANA Cloud knowledge graph engine?

A fact as subject – predicate – object with IRIs. You load and change data with SPARQL through SPARQL_EXECUTE, and embed SPARQL SELECT results in SQL with SPARQL_TABLE; the instance needs version 2025.2+ with the triple store enabled.

Q11. Knowledge graph engine vs property graph engine vs SAP Knowledge Graph?

The knowledge graph engine is an RDF store with SPARQL in your HANA Cloud database; the property graph engine runs openCypher and graph algorithms over your own vertex and edge tables; SAP Knowledge Graph is SAP's managed semantic map of SAP entities and APIs used by Joule and agents.

Q12. When does graph RAG beat plain RAG?

When answers need multi-hop relationships, exact structured facts or aggregation – e.g. which plants depend on a vendor's part. Plain RAG is enough when the answer sits in one or two text passages.

Q13. What are the risks of text-to-SPARQL and how do you control them?

Wrong or harmful generated queries. Use a read-only database user, allow only SELECT, add limits, validate and log the query, keep a clear ontology, and prefer fixed queries for known patterns.

Q14. How do you evaluate a RAG system?

A test set of real questions with expected answers and sources; measure retrieval recall@k, faithfulness, answer correctness, citation accuracy, refusal behaviour, latency and cost; change one parameter at a time and keep production feedback as new test cases.

09 · Building & Deploying SAP AI Apps & Agents

Q1. Describe the architecture of a GenAI app on SAP BTP.

UI (Fiori / UI5) → app router with XSUAA → backend on Cloud Foundry (Python with LangChain / LangGraph or CAP) → generative AI hub orchestration for models, masking and filters; HANA Cloud for vectors, knowledge graph and state; Destination service (and Cloud Connector) to released S/4HANA APIs; LangSmith / OpenTelemetry, Cloud Logging and Audit Log for operations.

Q2. How does a Python app on Cloud Foundry get its SAP AI Core credentials?

By binding the AI Core instance – credentials appear in VCAP_SERVICES and the SAP Cloud SDK for AI reads them automatically. Locally AICORE_* variables or ~/.aicore/config.json. Never in code or in the browser.

Q3. Why must the backend validate the JWT although the app router already logs the user in?

The backend has its own public route and can be called directly. It validates the forwarded token with sap-xssec and checks scopes such as $XSAPPNAME.Use for every request.

Q4. Explain state, nodes, edges and checkpointers in LangGraph.

State is the data passed through the graph (e.g. messages); nodes are functions that update it; edges and conditional edges decide the next node; the checkpointer saves the state per thread_id, which gives memory and allows pausing and resuming.

Q5. How does your agent call S/4HANA?

Through tools that call released OData APIs (e.g. API_EQUIPMENT, API_MAINTNOTIFICATION). The URL and authentication come from a BTP destination looked up at run time; writes fetch a CSRF token first; inputs are validated against injection.

Q6. How do you implement human-in-the-loop approval?

The write tool calls interrupt() with the proposal; the graph pauses and the state is checkpointed. The UI shows Approve / Edit / Reject, and the backend resumes with Command(resume=...) on the same thread after checking the approver's scope. The POST happens only after the interrupt.

Q7. Which conversation memory would you use in production?

A persistent checkpointer such as PostgresSaver, because InMemorySaver is lost on restart and not shared between instances; thread IDs built server-side from the user, plus trimming and a retention policy.

Q8. Principal propagation or technical user for agent tools?

Principal propagation when the S/4HANA authorizations of the actual user must apply and be audited; a technical user with minimal roles for system-level reads. Either way the agent can never do more than that identity.

Q9. SAP Cloud SDK for AI or the CAP LLM plugin in a CAP project?

The SAP Cloud SDK for AI – it is SAP's official SDK aligned with the AI Core roadmap. The CAP LLM plugin is an older community plugin with a narrower scope (anonymisation, embeddings, RAG).

Q10. How do you handle images in a GenAI app?

Use a vision-capable model (check the model card), send the image as a data URL or ImageItem, downscale it, never trust extracted values without checking them against the system, and use SAP Document AI for structured document extraction.

Q11. What do you monitor in a production agent?

Traces of LLM and tool calls, tokens and latency per step, model and prompt versions, tool errors, retrieved sources, approvals and user feedback – in LangSmith or OpenTelemetry plus structured logs; AI Core quotas and consumption.

Q12. manifest.yml or mta.yaml?

cf push with a manifest is quick for a single app in a dev space. An MTA describes the whole solution – backend, app router, XSUAA, destination, existing AI Core and HANA – deployed together with dependencies and landscape-specific extension descriptors; that is the production choice.

Q13. Which governance controls does a production AI app on SAP need?

Content filters, data masking, prompt-injection defences, least-privilege tools, human approval for writes, audit logging, pinned model and prompt versions, an evaluation gate before deployment, transparency to users, retention rules and cost limits.