microsoft / microsoft/OmniParser

Question about prompt in utils.py

Open
#343 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
25.4k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

I wonder why the prompt seems generic in get_parsed_content_icon() , wouldn't that result in potential hallucinations?
https://github.com/microsoft/OmniParser/blob/b0d5c9f5701f7e2be4771872e6e928da77759df3/util/utils.py#L102
if not prompt:
if 'florence' in model.config.name_or_path:
prompt = ""
else:
prompt = "The image shows"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with util/utils.py at get_parsed_content_icon(), especially the prompt fallback around line 102. Trace how the prompt is passed to the model and compare the Florence and non-Florence paths. Done means establishing whether the generic prompt can cause hallucinations and clearly determining whether a code change is needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.