{"ref":"artifact:sap-samples-btp-ai-bp-prompt-templating-cap","page":"/artifacts/sap-samples-btp-ai-bp-prompt-templating-cap","json":"/artifacts/sap-samples-btp-ai-bp-prompt-templating-cap.json","generated":"2026-11-15","drafted_with_ai":true,"entity":{"id":"sap-samples-btp-ai-bp-prompt-templating-cap","name":"SAP BTP AI Best Practice Demo - Prompt Templating - CAP","artifact_type":"sample","ecosystem":"cap","serves_ecosystems":["btp"],"flavors":[{"key":"node","source":{"url":"https://raw.githubusercontent.com/SAP-samples/sap-btp-ai-best-practices/main/best-practices/generative-ai/prompt-templating/cap/backend-sample/README.md","title":"SAP-samples/sap-btp-ai-best-practices — prompt-templating/cap/backend-sample README, prerequisites","checked":"2026-10-19","quote":"Node.js LTS version"}}],"use_as":"reference","domain":"ai-and-agents","origin_ring":"sap-official","description":{"one_line":"A CAP backend-sample and fullstack-sample that fill a country placeholder in a prompt template through the SAP Cloud SDK for AI and send it to [SAP AI Core](artifact:btp-ai-core).","short":"CAP samples filling a prompt template sent to SAP AI Core","what_it_solves":"The backend-sample exposes one `orchestration` service action, `askCapitalOfCountry`, that fills the template through the SAP Cloud SDK for AI before calling the model; the fullstack-sample adds a UI5 app under app/ask-capital that drives the same action and its README shows the request and response in two screenshots. Both bind to a [SAP AI Core](artifact:btp-ai-core) service instance with `cds bind` before the action can run.","when_not_to_use":"Every CDS service in both samples is marked `@requires: 'any'` and left publicly accessible, which the README says simplifies the testing and deployment process, and it asks for proper authentication mechanisms to be applied in their place."},"links":{"repo":"https://github.com/SAP-samples/sap-btp-ai-best-practices/tree/main/best-practices/generative-ai/prompt-templating/cap"},"type_properties":{"form":{"value":"reference-application","sources":[{"url":"https://raw.githubusercontent.com/SAP-samples/sap-btp-ai-best-practices/main/best-practices/generative-ai/prompt-templating/cap/backend-sample/README.md","title":"SAP-samples/sap-btp-ai-best-practices — prompt-templating/cap/backend-sample README","checked":"2026-10-19","quote":"This project demonstrates best practices for using prompt templating with AI models through SAP BTP services."}]}},"identity":{"license":"Apache-2.0"},"source_available":true,"compat":{"runtimes":["node"]},"demonstrates":["capability:prompt-management"],"requires":[{"ref":"artifact:btp-ai-core","for":"The service instance the samples bind to at runtime to resolve the prompt template and return a completion, bound locally with `cds bind`.","sources":[{"url":"https://raw.githubusercontent.com/SAP-samples/sap-btp-ai-best-practices/main/best-practices/generative-ai/prompt-templating/cap/backend-sample/README.md","title":"SAP-samples/sap-btp-ai-best-practices — prompt-templating/cap/backend-sample README","checked":"2026-10-19","quote":"Access to SAP AI Core service"}]}],"connects":[{"ref":"artifact:btp-ai-core","kind":"data","direction":"outbound","for":"The filled template the action sends to the model, and the response it logs.","sources":[{"url":"https://raw.githubusercontent.com/SAP-samples/sap-btp-ai-best-practices/main/best-practices/generative-ai/prompt-templating/cap/backend-sample/README.md","title":"SAP-samples/sap-btp-ai-best-practices — prompt-templating/cap/backend-sample README, configuration","checked":"2026-10-19","quote":"The application requires proper configuration to connect to the SAP AI Core service. This is handled through CDS bindings in both local and remote deployments."},{"url":"https://raw.githubusercontent.com/SAP-samples/sap-btp-ai-best-practices/main/best-practices/generative-ai/prompt-templating/cap/backend-sample/README.md","title":"SAP-samples/sap-btp-ai-best-practices — prompt-templating/cap/backend-sample README, usage","checked":"2026-10-19","quote":"The application will serve the `/askCapitalOfCountry` API, which uses prompt templating, then sends a prompt to the AI model and logs the response."}]}],"interfaces":[{"kind":"api","protocol":"odata-v4","direction":"in","for":"`askCapitalOfCountry`, posted to with the country the template is filled from.","sources":[{"url":"https://raw.githubusercontent.com/SAP-samples/sap-btp-ai-best-practices/main/best-practices/generative-ai/prompt-templating/cap/backend-sample/README.md","title":"SAP-samples/sap-btp-ai-best-practices — prompt-templating/cap/backend-sample README, usage","checked":"2026-10-19","quote":"The application will serve the `/askCapitalOfCountry` API, which uses prompt templating"},{"url":"https://raw.githubusercontent.com/SAP-samples/sap-btp-ai-best-practices/main/best-practices/generative-ai/prompt-templating/cap/backend-sample/README.md","title":"SAP-samples/sap-btp-ai-best-practices — prompt-templating/cap/backend-sample README, usage","checked":"2026-10-19","quote":"--url http://$SAMPLE_CAP_HOST/odata/v4/orchestration/askCapitalOfCountry"}]}],"maintainers":["actor:sap-samples"],"drafted_with_ai":true,"provenance":{"discovered_via":[{"source":"source:curator"}],"first_seen":"2026-09-14"},"contributors":["actor:luismarques-io"]},"effective_normative_relations":[],"readings":{"liveness":[{"label":"Maintenance","tier":"unknown","evidence":"no release data"},{"label":"Continuity","tier":"good","evidence":"15 contributors, org-owned"},{"label":"Repository","tier":"good","evidence":"pushed 2026-11, not archived"}],"compatibility":[{"label":"Declared for","tier":"fair","evidence":"nothing declared"},{"label":"Survived majors","tier":"unknown","evidence":"no release dates"},{"label":"Maintainer's CI","tier":"fair","evidence":"no CI configured"}],"practice":[{"label":"Tests","tier":"good","evidence":"315 test files"},{"label":"Docs","tier":"poor","evidence":"README 1 KB"},{"label":"Changelog","tier":"fair","evidence":"none in the repo"}],"reach":[{"value":null,"unit":"installs/week"},{"value":73,"unit":"watching"}]},"signals":{"crawled_at":"2026-11-13","npm":"not published under this name","stars":73,"forks":61,"open_issues":13,"archived":false,"pushed_at":"2026-11-11","license_spdx":"Apache-2.0","org_owned":true,"default_branch":"main","created_at":"2025-03-07T14:29:58Z","open_prs":6,"tree_truncated":false,"test_files":315,"workflows":0,"other_ci":false,"readme_bytes":794,"docs_files":0,"changelog":false,"license_file":true,"dts_files":2,"first_commit":"2025-05-27","last_commit":"2025-05-27","commits":1,"contributors":15,"readme_path":"best-practices/generative-ai/prompt-templating/cap/README.md","readme_sha":"2ad8b1641a78f1eee4beae51f294aa306290743f","repo_read":"2026-11-13","language":"Jupyter Notebook"},"edges":{"maintainers":[{"ref":"actor:sap-samples","name":"SAP Samples","json":"/actors/sap-samples.json"}],"contributors":[{"ref":"actor:luismarques-io","name":"Luís Marques","json":"/actors/luismarques-io.json"}],"explained_by":[],"alternative_to_this":[],"needed_by":[],"available_via":[],"parts":[],"add_ons":[],"answered_through_parts":[]}}