Skip to content

Conversation

@levscaut
Copy link
Contributor

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

Replaced the placeholder s"[Content for column '$columnName' will be provided later as an attachment.]" with simply the file names in the message. For example:
Template: "Analyze this image: {image_path}"
Path column image_path with value /some/folder/photo.jpg
Previous result will be: "Analyze this image: [Content for column 'image_path' will be provided later as an attachment.]"
The result now will be: "Analyze this image: photo.jpg"

How is this patch tested?

  • I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Does this PR change any dependencies?

  • No. You can skip this section.
  • Yes. Make sure the dependencies are resolved correctly, and list changes here.

Does this PR add a new feature? If so, have you added samples on website?

  • No. You can skip this section.
  • Yes. Make sure you have added samples following below steps.
  1. Find the corresponding markdown file for your new feature in website/docs/documentation folder.
    Make sure you choose the correct class estimators/transformers and namespace.
  2. Follow the pattern in markdown file and add another section for your new API, including pyspark, scala (and .NET potentially) samples.
  3. Make sure the DocTable points to correct API link.
  4. Navigate to website folder, and run yarn run start to make sure the website renders correctly.
  5. Don't forget to add <!--pytest-codeblocks:cont--> before each python code blocks to enable auto-tests for python samples.
  6. Make sure the WebsiteSamplesTests job pass in the pipeline.

@levscaut
Copy link
Contributor Author

/azp run

@github-actions
Copy link

Hey @levscaut 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.

We use semantic commit messages to streamline the release process.
Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix.
This helps us to create release messages and credit you for your hard work!

Examples of commit messages with semantic prefixes:

  • fix: Fix LightGBM crashes with empty partitions
  • feat: Make HTTP on Spark back-offs configurable
  • docs: Update Spark Serving usage
  • build: Add codecov support
  • perf: improve LightGBM memory usage
  • refactor: make python code generation rely on classes
  • style: Remove nulls from CNTKModel
  • test: Add test coverage for CNTKModel

To test your commit locally, please follow our guild on building from source.
Check out the developer guide for additional guidance on testing your change.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.31%. Comparing base (b979064) to head (04b35aa).

Files with missing lines Patch % Lines
...zure/synapse/ml/services/openai/OpenAIPrompt.scala 86.95% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2456      +/-   ##
==========================================
- Coverage   84.35%   84.31%   -0.04%     
==========================================
  Files         335      335              
  Lines       17729    17734       +5     
  Branches     1621     1602      -19     
==========================================
- Hits        14955    14953       -2     
- Misses       2774     2781       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@levscaut
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@levscaut levscaut enabled auto-merge (squash) December 15, 2025 17:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modifies the OpenAIPrompt transformer to replace path placeholders in prompt templates with actual filenames instead of generic attachment notices. Previously, path columns referenced in templates like {image_path} were replaced with text like "[Content for column 'image_path' will be provided later as an attachment.]". Now they are replaced with the actual filename (e.g., "photo.jpg") extracted from the path.

Key changes:

  • Removed applyPathPlaceholders and attachmentPlaceholder methods that generated generic placeholder text
  • Added new processPathColumns method that extracts filenames from path columns and creates temporary filename columns
  • Updated transform method to use filename references in templates and clean up temporary columns after processing

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
OpenAIPrompt.scala Refactored path column handling to extract and use actual filenames in prompt templates instead of placeholder text
OpenAIPromptSuite.scala Removed test for deprecated applyPathPlaceholders method and reformatted unrelated test code

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@levscaut
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

ranadeepsingh
ranadeepsingh previously approved these changes Dec 15, 2025
@levscaut
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@levscaut levscaut merged commit bcf251c into microsoft:master Dec 17, 2025
68 of 69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants