She was attacked near Laird Avenue in Methil about 8pm yesterday.
The 20-year-old woman was walking in Herriot Crescent and on to Kirkland Walk when a man approached.
He threatened her with a knife before forcing her on to an area of wasteland where she was attacked.
The woman eventually managed to escape from her attacker and sought assistance from two members of the public in the nearby industrial estate.
Detective Chief Inspector Scott Cunningham said: “This has been a terrifying ordeal for the young woman that has left her deeply distressed.
“We are providing her with all the support and assistance she requires while we investigate this very serious incident.
“Our inquiry is being supported by uniformed officers, who are conducting high-visibility patrols within Methil to offer reassurance to the public, as well as colleagues from specialist national divisions.
“As part of this investigation, we are keen to hear from anyone who remembers seeing any suspicious activity within the areas around Herriot Crescent, Kirkland Walk or the wasteland near Laird Avenue during Tuesday evening.
“We also have a very good description of the suspect and anyone who believes they can help us identify him should contact police immediately.”
Police Scotland say inquiries are ongoing to identify the suspect and urged anyone with information to come forward.
The man is described as white, aged around 20, 5ft 8in, with a medium build, light-brown wavy hair and he was wearing a dark waterproof jacket and dark tracksuit bottoms.
He appeared to be under the influence of drink or drugs.