  Inversion techniques (ITs) allow us to infer the magnetic, dynamic, and
thermal properties of the solar atmosphere from polarization line profiles. In
recent years, major progress has come from the application of ITs to
state-of-the-art observations. This paper summarizes the main results achieved
both in the photosphere and in the chromosphere. It also discusses the
challenges facing ITs in the near future. Understanding the limitations of
spectral lines, implementing more complex atmospheric models, and devising
efficient strategies of data analysis for upcoming ground-based and space-borne
instruments, are among the most important issues that need to be addressed. It
is argued that proper interpretations of diffraction-limited Stokes profiles
will not be possible without accounting for gradients of the atmospheric
parameters along the line of sight. The feasibility of determining gradients in
real time from space-borne observations is examined.
