Advice to police in England and Wales clarifying the circumstances in which a person can consent to sex has been given by the Crown Prosecution Service.
The law already states consent must be given fully and freely, but the new guidance instructs officials to look at the whole context of a rape allegation.
It spells out that behaviour such as staying silent or using contraception does not signify consent.
The CPS said it would help dispel "myths and stereotypes" about rape.
The document specifies that consent cannot be given where someone is incapacitated through drink or drugs or where a suspect held a position of power over the potential victim as a teacher, an employer or a doctor.
The ability to consent to sex should also be questioned where someone has mental health problems, learning difficulties or was asleep or unconscious at the time of an alleged attack, it said.
Situations involving previous incidents of domestic violence or those where the complainant "may be financially or otherwise dependent on their alleged rapist" should also be scrutinised, according to the CPS.
Director of Public Prosecutions Alison Saunders told the BBC: "This is really about making sure investigators and prosecutors look at the whole context, so we're able to put strong cases before the court and we don't just focus on what a victim did or said."
She added: "We know there are too many myths and stereotypes around rape and consent and this is about making sure we really examine cases."
The guidelines were launched at the first national conference on rape investigations, held jointly by the CPS and police forces in England and Wales.
Speaking at the conference, Metropolitan Police Assistant Commissioner Martin Hewitt said: "There is still far too much variation in the way that forces move a complaint of rape through the system."
He highlighted problems around police deciding in favour of "no further action" or recording "no crime".
These issues need to be tackled in order to "send a clear and unequivocal message to victims about how they will be treated," the assistant commissioner urged.
Katie Russell, spokeswoman for Rape Crisis England and Wales, welcomed the move, saying that the charity had observed that "among the many reasons for survivors' reluctance to report is fear, including fear of not being well treated by the criminal justice system."
She said she hoped the guidance would further "the cultural shift necessary for sexual violence survivors to receive the criminal justice they want and deserve".
The advice forms part of a wider drive known as the rape action plan which was launched earlier in January by the CPS and is aimed at securing more successful prosecutions for rape.