On this page of the Baldurs Gate 3 guide, you will find out if it is possible to avoid combat. You can find information on sneaking and skill rolls here.
During exploration, you will encounter a number of adversaries. Meeting some of them ends with mandatory combat. However, there are encounters where the ability to avoid combat appears. Of course, attempts to avoid combat may backfire - luck is one of the factors here. The game offers two such methods.
This option is available if the fight is preceded by a conversation with a potential opponent. A skill roll is a test based on specific skills possessed by a given character. The dialogue paths that use this mechanic have a square parenthesis that tells you what character's ability will be tested.
Once a particular option is selected, a dice throw window will be shown. You can see on it what value you need to achieve for a character to pass their test. If the dice lands on a wrong side, the attempt will fail. You cannot do a second throw. You can also load your latest save and try again.
Note: for more information on skill rolls, please visit a dedicated page of the guide.
The second option involves stealth. In this case, you must select a specific character and select the "hide" option found on the action bar. The character then begins to move silently, and until the opponent notices him, he is safe.
Each opponent has a specific viewcone, which is marked in red. If you find yourself in it, you will automatically be detected and the fight begins.
The range of vision is affected by light. If a character is in the shadows, the enemies may not be able to notice him. Darkness affects the range of vision of the character.
Sneaking alone can be used not only to avoid a fight. It also allows you to surprise your opponent and gain an extra advantage at the start. Such an attack does not spend action points, so you can gain a second move in a row.